couple more tweaks to the way locktime vars are passed around

This commit is contained in:
OutCast3k 2014-12-15 15:11:09 +00:00
parent 23b6c84d1f
commit cdee027c01
2 changed files with 3 additions and 4 deletions

View file

@ -369,11 +369,11 @@
r.block = null;
/* add an input to a transaction */
r.addinput = function(txid, index, script, sequence){
r.addinput = function(txid, index, script){
var o = {};
o.outpoint = {'hash':txid, 'index':index};
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);
}

View file

@ -356,8 +356,7 @@ $(document).ready(function() {
$.each($("#inputs .row"), function(i,o){
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(), sequence);
tx.addinput($(".txId",o).val(), $(".txIdN",o).val(), $(".txIdScript",o).val());
}
});