MCPcopy Create free account
hub / github.com/ElementsProject/elements / AddCScriptWithDB

Method AddCScriptWithDB

src/wallet/scriptpubkeyman.cpp:1541–1550  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1539}
1540
1541bool LegacyScriptPubKeyMan::AddCScriptWithDB(WalletBatch& batch, const CScript& redeemScript)
1542{
1543 if (!FillableSigningProvider::AddCScript(redeemScript))
1544 return false;
1545 if (batch.WriteCScript(Hash160(redeemScript), redeemScript)) {
1546 m_storage.UnsetBlankWalletFlag(batch);
1547 return true;
1548 }
1549 return false;
1550}
1551
1552bool LegacyScriptPubKeyMan::AddKeyOriginWithDB(WalletBatch& batch, const CPubKey& pubkey, const KeyOriginInfo& info)
1553{

Callers

nothing calls this directly

Calls 3

Hash160Function · 0.85
WriteCScriptMethod · 0.80
UnsetBlankWalletFlagMethod · 0.80

Tested by

no test coverage detected