mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Add pegin input serialization
This commit is contained in:
parent
ac1eadd0de
commit
ae54d4ad74
11 changed files with 189 additions and 1 deletions
|
|
@ -200,6 +200,7 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry,
|
|||
o.pushKV("asm", ScriptToAsmStr(txin.scriptSig, true));
|
||||
o.pushKV("hex", HexStr(txin.scriptSig.begin(), txin.scriptSig.end()));
|
||||
in.pushKV("scriptSig", o);
|
||||
|
||||
if (!tx.vin[i].scriptWitness.IsNull()) {
|
||||
UniValue txinwitness(UniValue::VARR);
|
||||
for (const auto& item : tx.vin[i].scriptWitness.stack) {
|
||||
|
|
@ -207,6 +208,16 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry,
|
|||
}
|
||||
in.pushKV("txinwitness", txinwitness);
|
||||
}
|
||||
|
||||
// ELEMENTS:
|
||||
in.pushKV("is_pegin", txin.m_is_pegin);
|
||||
if (!tx.vin[i].m_pegin_witness.IsNull()) {
|
||||
UniValue pegin_witness(UniValue::VARR);
|
||||
for (const auto& item : tx.vin[i].m_pegin_witness.stack) {
|
||||
pegin_witness.push_back(HexStr(item.begin(), item.end()));
|
||||
}
|
||||
in.pushKV("pegin_witness", pegin_witness);
|
||||
}
|
||||
}
|
||||
in.pushKV("sequence", (int64_t)txin.nSequence);
|
||||
vin.push_back(in);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue