mirror of
https://github.com/ok2/coinbin.git
synced 2026-04-24 03:34:02 +02:00
couple more tweaks to the way locktime vars are passed around
This commit is contained in:
parent
23b6c84d1f
commit
cdee027c01
@ -369,11 +369,11 @@
|
|||||||
r.block = null;
|
r.block = null;
|
||||||
|
|
||||||
/* add an input to a transaction */
|
/* add an input to a transaction */
|
||||||
r.addinput = function(txid, index, script, sequence){
|
r.addinput = function(txid, index, script){
|
||||||
var o = {};
|
var o = {};
|
||||||
o.outpoint = {'hash':txid, 'index':index};
|
o.outpoint = {'hash':txid, 'index':index};
|
||||||
o.script = coinjs.script(script||[]);
|
o.script = coinjs.script(script||[]);
|
||||||
o.sequence = (typeof sequence===undefined) ? 4294967295 : sequence;
|
o.sequence = (r.lock_time==0) ? 4294967295 : 0;
|
||||||
return this.ins.push(o);
|
return this.ins.push(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -356,8 +356,7 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
$.each($("#inputs .row"), function(i,o){
|
$.each($("#inputs .row"), function(i,o){
|
||||||
if($(".txId",o).val()!="" && $(".txIdN",o).val()!=""){
|
if($(".txId",o).val()!="" && $(".txIdN",o).val()!=""){
|
||||||
var sequence = ($("#nLockTime").val()=="0") ? 4294967295 : 0;
|
tx.addinput($(".txId",o).val(), $(".txIdN",o).val(), $(".txIdScript",o).val());
|
||||||
tx.addinput($(".txId",o).val(), $(".txIdN",o).val(), $(".txIdScript",o).val(), sequence);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user