| 1616 | } |
| 1617 | |
| 1618 | void DescriptorScriptPubKeyMan::UpdateWithSigningProvider(WalletBatch& batch, const FlatSigningProvider& signing_provider) |
| 1619 | { |
| 1620 | AssertLockHeld(cs_desc_man); |
| 1621 | // Add the private keys to the descriptor |
| 1622 | for (const auto& entry : signing_provider.keys) { |
| 1623 | const CKey& key = entry.second; |
| 1624 | if (!AddDescriptorKeyWithDB(batch, key, key.GetPubKey())) { |
| 1625 | throw std::runtime_error(std::string(__func__) + ": writing descriptor private key failed"); |
| 1626 | } |
| 1627 | } |
| 1628 | |
| 1629 | // Top up key pool, to generate scriptPubKeys |
| 1630 | if (!TopUpWithDB(batch)) { |
| 1631 | throw std::runtime_error("Could not top up scriptPubKeys"); |
| 1632 | } |
| 1633 | } |
| 1634 | |
| 1635 | bool DescriptorScriptPubKeyMan::CanUpdateToWalletDescriptor(const WalletDescriptor& descriptor, std::string& error) |
| 1636 | { |
no test coverage detected