mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Add is_pegin response for raw transaction RPCs
This commit is contained in:
parent
d4d00da7f4
commit
6534bd3b86
2 changed files with 6 additions and 0 deletions
|
|
@ -172,6 +172,11 @@ try:
|
|||
else:
|
||||
raise Exception("Peg-in confirmation has failed.")
|
||||
|
||||
# Look at pegin fields
|
||||
decoded = sidechain.decoderawtransaction(tx1["hex"])
|
||||
assert decoded["vin"][0]["is_pegin"] == True
|
||||
assert len(decoded["vin"][0]["pegin_witness"]) > 0
|
||||
|
||||
# Quick reorg checks of pegs
|
||||
sidechain.invalidateblock(blockhash[0])
|
||||
if sidechain.gettransaction(pegtxid1)["confirmations"] != 0:
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue& entry)
|
|||
o.push_back(Pair("asm", ScriptToAsmStr(txin.scriptSig, true)));
|
||||
o.push_back(Pair("hex", HexStr(txin.scriptSig.begin(), txin.scriptSig.end())));
|
||||
in.push_back(Pair("scriptSig", o));
|
||||
in.push_back(Pair("is_pegin", txin.m_is_pegin));
|
||||
}
|
||||
if (tx.HasWitness()) {
|
||||
UniValue scriptWitness(UniValue::VARR);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue