mirror of
https://github.com/ok2/coinbin.git
synced 2026-05-09 18:15:23 +02:00
coinb.in now supports replace by fee (RBF) transactions
This commit is contained in:
+2
-2
@@ -776,11 +776,11 @@
|
||||
r.block = null;
|
||||
|
||||
/* add an input to a transaction */
|
||||
r.addinput = function(txid, index, script){
|
||||
r.addinput = function(txid, index, script, sequence){
|
||||
var o = {};
|
||||
o.outpoint = {'hash':txid, 'index':index};
|
||||
o.script = coinjs.script(script||[]);
|
||||
o.sequence = (r.lock_time==0) ? 4294967295 : 0;
|
||||
o.sequence = sequence || ((r.lock_time==0) ? 4294967295 : 0);
|
||||
return this.ins.push(o);
|
||||
}
|
||||
|
||||
|
||||
+12
-1
@@ -487,7 +487,12 @@ $(document).ready(function() {
|
||||
}
|
||||
|
||||
if(!$(o).hasClass("has-error")){
|
||||
tx.addinput($(".txId",o).val(), $(".txIdN",o).val(), $(".txIdScript",o).val());
|
||||
var seq = null;
|
||||
if($("#txRBF").is(":checked")){
|
||||
seq = 0xffffffff-2;
|
||||
}
|
||||
|
||||
tx.addinput($(".txId",o).val(), $(".txIdN",o).val(), $(".txIdScript",o).val(), seq);
|
||||
} else {
|
||||
$('#putTabs a[href="#txinputs"]').attr('style','color:#a94442;');
|
||||
}
|
||||
@@ -1087,6 +1092,7 @@ $(document).ready(function() {
|
||||
$("#verifyTransactionData .transactionVersion").html(decode['version']);
|
||||
$("#verifyTransactionData .transactionSize").html(decode.size()+' <i>bytes</i>');
|
||||
$("#verifyTransactionData .transactionLockTime").html(decode['lock_time']);
|
||||
$("#verifyTransactionData .transactionRBF").hide();
|
||||
$("#verifyTransactionData").removeClass("hidden");
|
||||
$("#verifyTransactionData tbody").html("");
|
||||
|
||||
@@ -1112,6 +1118,11 @@ $(document).ready(function() {
|
||||
}
|
||||
h += '</td>';
|
||||
h += '</tr>';
|
||||
|
||||
//debug
|
||||
if(parseInt(o.sequence)<(0xFFFFFFFF-1)){
|
||||
$("#verifyTransactionData .transactionRBF").show();
|
||||
}
|
||||
});
|
||||
|
||||
$(h).appendTo("#verifyTransactionData .ins tbody");
|
||||
|
||||
Reference in New Issue
Block a user