Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
ismine.h
Go to the documentation of this file.
1// Copyright (c) 2009-2010 Satoshi Nakamoto
2// Copyright (c) 2009-2016 The Bitcoin Core developers
3// Distributed under the MIT software license, see the accompanying
4// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
6#ifndef BITCOIN_WALLET_ISMINE_H
7#define BITCOIN_WALLET_ISMINE_H
8
9#include <script/standard.h>
10
11#include <bitset>
12#include <cstdint>
13
14class CWallet;
15class CScript;
16
27
30
35 // NO and ALL are never (supposed to be) cached
36 std::bitset<ISMINE_ENUM_ELEMENTS> m_cached;
38 inline void Reset() { m_cached.reset(); }
39 void Set(isminefilter filter, Amount value) {
40 m_cached.set(filter);
41 m_value[filter] = value;
42 }
43};
44
45#endif // BITCOIN_WALLET_ISMINE_H
Serialized script, used inside transaction inputs and outputs.
Definition script.h:424
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
Definition wallet.h:254
isminetype
IsMine() return codes.
Definition ismine.h:18
@ ISMINE_ALL
Definition ismine.h:23
@ ISMINE_SPENDABLE
Definition ismine.h:21
@ ISMINE_NO
Definition ismine.h:19
@ ISMINE_WATCH_ONLY
Definition ismine.h:20
@ ISMINE_ALL_USED
Definition ismine.h:24
@ ISMINE_USED
Definition ismine.h:22
@ ISMINE_ENUM_ELEMENTS
Definition ismine.h:25
uint8_t isminefilter
used for bitflags of isminetype
Definition ismine.h:29
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85
Cachable amount subdivided into watchonly and spendable parts.
Definition ismine.h:34
Amount m_value[ISMINE_ENUM_ELEMENTS]
Definition ismine.h:37
void Set(isminefilter filter, Amount value)
Definition ismine.h:39
std::bitset< ISMINE_ENUM_ELEMENTS > m_cached
Definition ismine.h:36
void Reset()
Definition ismine.h:38