increased the amount of bytes allowed when using op_return from 40 to 80

This commit is contained in:
OutCast3k
2015-07-27 18:04:41 +00:00
parent cacc30cc95
commit 6f8cd22d5f
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -796,7 +796,7 @@
/* add data to a transaction */
r.adddata = function(data){
var r = false;
if(((data.match(/^[a-f0-9]+$/gi)) && data.length<80) && (data.length%2)==0) {
if(((data.match(/^[a-f0-9]+$/gi)) && data.length<160) && (data.length%2)==0) {
var s = coinjs.script();
s.writeOp(106); // OP_RETURN
s.writeBytes(Crypto.util.hexToBytes(data));
+1 -1
View File
@@ -417,7 +417,7 @@ $(document).ready(function() {
tx.addoutput(a, $(".amount",o).val());
} else if (((a!="") && ad.version === 42) && $(".amount",o).val()!=""){ // stealth address
tx.addstealth(ad, $(".amount",o).val());
} else if (((($("#opReturn").is(":checked")) && a.match(/^[a-f0-9]+$/ig)) && a.length<80) && (a.length%2)==0) { // data
} else if (((($("#opReturn").is(":checked")) && a.match(/^[a-f0-9]+$/ig)) && a.length<160) && (a.length%2)==0) { // data
tx.adddata(a);
} else { // neither address nor data
$(o).addClass('has-error');