mirror of
https://github.com/ok2/coinbin.git
synced 2026-05-09 18:15:23 +02:00
increased the amount of bytes allowed when using op_return from 40 to 80
This commit is contained in:
+1
-1
@@ -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
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user