mirror of
https://github.com/ok2/coinbin.git
synced 2026-05-09 18:15:23 +02:00
fixed a timelocked address bug as reported on issue 60
This commit is contained in:
+2
-2
@@ -148,7 +148,7 @@
|
||||
}
|
||||
|
||||
var s = coinjs.script();
|
||||
s.writeBytes(coinjs.numToByteArray(checklocktimeverify).reverse());
|
||||
s.writeBytes(coinjs.numToByteArray(checklocktimeverify));
|
||||
s.writeOp(177);//OP_CHECKLOCKTIMEVERIFY
|
||||
s.writeOp(117);//OP_DROP
|
||||
s.writeBytes(Crypto.util.hexToBytes(pubkey));
|
||||
@@ -687,7 +687,7 @@
|
||||
// ^ <unlocktime> OP_CHECKLOCKTIMEVERIFY OP_DROP <pubkey> OP_CHECKSIG ^
|
||||
r = {}
|
||||
r.pubkey = Crypto.util.bytesToHex(s.chunks[3]);
|
||||
r.checklocktimeverify = coinjs.bytesToNum(s.chunks[0].slice().reverse());
|
||||
r.checklocktimeverify = coinjs.bytesToNum(s.chunks[0].slice());
|
||||
r.address = coinjs.simpleHodlAddress(r.pubkey, r.checklocktimeverify).address;
|
||||
r.type = "hodl__";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user