aboutsummaryrefslogtreecommitdiff
path: root/src/keystore.cpp
diff options
context:
space:
mode:
authorMeshCollider <dobsonsa68@gmail.com>2017-11-11 20:49:27 +1300
committerMeshCollider <dobsonsa68@gmail.com>2017-12-20 18:47:55 +1300
commitcdc260afd530165a3167e049b630bc177a1398f9 (patch)
treee3c5114fb9871fdda46110763f4559637d119824 /src/keystore.cpp
parent18a1bbad98bd4321f15e7921d9aec91661499d90 (diff)
Add GetCScripts to CBasicKeyStore
Diffstat (limited to 'src/keystore.cpp')
-rw-r--r--src/keystore.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/keystore.cpp b/src/keystore.cpp
index 4ab089e032..a010a1244a 100644
--- a/src/keystore.cpp
+++ b/src/keystore.cpp
@@ -77,6 +77,16 @@ bool CBasicKeyStore::HaveCScript(const CScriptID& hash) const
return mapScripts.count(hash) > 0;
}
+std::set<CScriptID> CBasicKeyStore::GetCScripts() const
+{
+ LOCK(cs_KeyStore);
+ std::set<CScriptID> set_script;
+ for (const auto& mi : mapScripts) {
+ set_script.insert(mi.first);
+ }
+ return set_script;
+}
+
bool CBasicKeyStore::GetCScript(const CScriptID &hash, CScript& redeemScriptOut) const
{
LOCK(cs_KeyStore);