MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / DummySignInput

Method DummySignInput

src/wallet/wallet.cpp:1547–1558  ·  view source on GitHub ↗

Helper for producing a max-sized low-S low-R signature (eg 71 bytes) or a max-sized low-S signature (e.g. 72 bytes) if use_max_sig is true

Source from the content-addressed store, hash-verified

1545// Helper for producing a max-sized low-S low-R signature (eg 71 bytes)
1546// or a max-sized low-S signature (e.g. 72 bytes) if use_max_sig is true
1547bool CWallet::DummySignInput(CTxIn &tx_in, const CTxOut &txout, bool use_max_sig) const
1548{
1549 // Fill in dummy signatures for fee calculation.
1550 const CScript& scriptPubKey = txout.scriptPubKey;
1551 SignatureData sigdata;
1552
1553 if (!ProduceSignature(*this, use_max_sig ? DUMMY_MAXIMUM_SIGNATURE_CREATOR : DUMMY_SIGNATURE_CREATOR, scriptPubKey, sigdata, true)) {
1554 return false;
1555 }
1556 UpdateInput(tx_in, sigdata);
1557 return true;
1558}
1559
1560// Helper for producing a bunch of max-sized low-S low-R signatures (eg 71 bytes)
1561bool CWallet::DummySignTx(CMutableTransaction &txNew, const std::vector<CTxOut> &txouts, bool use_max_sig) const

Callers 1

Calls 2

ProduceSignatureFunction · 0.85
UpdateInputFunction · 0.85

Tested by

no test coverage detected