Changeset View
Changeset View
Standalone View
Standalone View
src/keystore.cpp
// Copyright (c) 2009-2010 Satoshi Nakamoto | // Copyright (c) 2009-2010 Satoshi Nakamoto | ||||
// Copyright (c) 2009-2016 The Bitcoin Core developers | // Copyright (c) 2009-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include <keystore.h> | #include <keystore.h> | ||||
#include <key.h> | #include <key.h> | ||||
#include <pubkey.h> | #include <pubkey.h> | ||||
#include <util.h> | #include <util/system.h> | ||||
void CBasicKeyStore::ImplicitlyLearnRelatedKeyScripts(const CPubKey &pubkey) { | void CBasicKeyStore::ImplicitlyLearnRelatedKeyScripts(const CPubKey &pubkey) { | ||||
AssertLockHeld(cs_KeyStore); | AssertLockHeld(cs_KeyStore); | ||||
CKeyID key_id = pubkey.GetID(); | CKeyID key_id = pubkey.GetID(); | ||||
// We must actually know about this key already. | // We must actually know about this key already. | ||||
assert(HaveKey(key_id) || mapWatchKeys.count(key_id)); | assert(HaveKey(key_id) || mapWatchKeys.count(key_id)); | ||||
// This adds the redeemscripts necessary to detect alternative outputs using | // This adds the redeemscripts necessary to detect alternative outputs using | ||||
// the same keys. Also note that having superfluous scripts in the keystore | // the same keys. Also note that having superfluous scripts in the keystore | ||||
▲ Show 20 Lines • Show All 153 Lines • Show Last 20 Lines |