Bitcoin ABC 0.31.6
P2P Digital Currency
protocol.h
Go to the documentation of this file.
1// Copyright (c) 2009-2010 Satoshi Nakamoto
2// Copyright (c) 2009-2019 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_PROTOCOL_H
7#define BITCOIN_PROTOCOL_H
8
9#include <netaddress.h>
10#include <serialize.h>
11#include <streams.h>
12#include <uint256.h>
13#include <util/time.h>
14
15#include <array>
16#include <cstdint>
17#include <string>
18
19class Config;
20
25static const unsigned int MAX_PROTOCOL_MESSAGE_LENGTH = 2 * 1024 * 1024;
26
35public:
36 static constexpr size_t MESSAGE_START_SIZE = 4;
37 static constexpr size_t MESSAGE_TYPE_SIZE = 12;
38 static constexpr size_t MESSAGE_SIZE_SIZE = 4;
39 static constexpr size_t CHECKSUM_SIZE = 4;
40 static constexpr size_t MESSAGE_SIZE_OFFSET =
42 static constexpr size_t CHECKSUM_OFFSET =
44 static constexpr size_t HEADER_SIZE = MESSAGE_START_SIZE +
47 typedef std::array<uint8_t, MESSAGE_START_SIZE> MessageMagic;
48
49 explicit CMessageHeader(const MessageMagic &pchMessageStartIn);
50
57 CMessageHeader(const MessageMagic &pchMessageStartIn, const char *msg_type,
58 unsigned int nMessageSizeIn);
59
60 std::string GetMessageType() const;
61 bool IsValid(const Config &config) const;
62 bool IsValidWithoutConfig(const MessageMagic &magic) const;
63 bool IsOversized(const Config &config) const;
64
66 READWRITE(obj.pchMessageStart, obj.m_msg_type, obj.nMessageSize,
67 obj.pchChecksum);
68 }
69
71 std::array<char, MESSAGE_TYPE_SIZE> m_msg_type;
72 uint32_t nMessageSize;
74};
75
80namespace NetMsgType {
81
86extern const char *VERSION;
91extern const char *VERACK;
96extern const char *ADDR;
102extern const char *ADDRV2;
109extern const char *SENDADDRV2;
114extern const char *INV;
118extern const char *GETDATA;
124extern const char *MERKLEBLOCK;
129extern const char *GETBLOCKS;
135extern const char *GETHEADERS;
139extern const char *TX;
145extern const char *HEADERS;
149extern const char *BLOCK;
154extern const char *GETADDR;
160extern const char *MEMPOOL;
165extern const char *PING;
171extern const char *PONG;
177extern const char *NOTFOUND;
185extern const char *FILTERLOAD;
193extern const char *FILTERADD;
201extern const char *FILTERCLEAR;
207extern const char *SENDHEADERS;
213extern const char *FEEFILTER;
221extern const char *SENDCMPCT;
227extern const char *CMPCTBLOCK;
233extern const char *GETBLOCKTXN;
239extern const char *BLOCKTXN;
245extern const char *GETCFILTERS;
250extern const char *CFILTER;
258extern const char *GETCFHEADERS;
264extern const char *CFHEADERS;
271extern const char *GETCFCHECKPT;
276extern const char *CFCHECKPT;
280extern const char *AVAHELLO;
285extern const char *AVAPOLL;
290extern const char *AVARESPONSE;
296extern const char *AVAPROOF;
297
302extern const char *GETAVAADDR;
303
308extern const char *GETAVAPROOFS;
309
314extern const char *AVAPROOFS;
315
320extern const char *AVAPROOFSREQ;
321
327bool IsBlockLike(const std::string &strCommand);
328}; // namespace NetMsgType
329
331const std::vector<std::string> &getAllNetMessageTypes();
332
336enum ServiceFlags : uint64_t {
337 // NOTE: When adding here, be sure to update serviceFlagToStr too
338 // Nothing
340 // NODE_NETWORK means that the node is capable of serving the complete block
341 // chain. It is currently set by all Bitcoin ABC non pruned nodes, and is
342 // unset by SPV clients or other light clients.
343 NODE_NETWORK = (1 << 0),
344 // NODE_GETUTXO means the node is capable of responding to the getutxo
345 // protocol request. Bitcoin ABC does not support this but a patch set
346 // called Bitcoin XT does. See BIP 64 for details on how this is
347 // implemented.
348 NODE_GETUTXO = (1 << 1),
349 // NODE_BLOOM means the node is capable and willing to handle bloom-filtered
350 // connections. Bitcoin ABC nodes used to support this by default, without
351 // advertising this bit, but no longer do as of protocol version 70011 (=
352 // NO_BLOOM_VERSION)
353 NODE_BLOOM = (1 << 2),
354 // Bit 4 was NODE_XTHIN, removed in v0.22.12
355
356 // Bit 5 was NODE_BITCOIN_CASH, removed in v0.22.8
357
358 // NODE_COMPACT_FILTERS means the node will service basic block filter
359 // requests.
360 // See BIP157 and BIP158 for details on how this is implemented.
362
363 // NODE_NETWORK_LIMITED means the same as NODE_NETWORK with the limitation
364 // of only serving the last 288 (2 day) blocks
365 // See BIP159 for details on how this is implemented.
367
368 // The last non experimental service bit, helper for looping over the flags
370
371 // Bits 24-31 are reserved for temporary experiments. Just pick a bit that
372 // isn't getting used, or one not being used much, and notify the
373 // bitcoin-development mailing list. Remember that service bits are just
374 // unauthenticated advertisements, so your code must be robust against
375 // collisions and other cases where nodes may be advertising a service they
376 // do not actually support. Other service bits should be allocated via the
377 // BIP process.
378
379 // NODE_AVALANCHE means the node supports Bitcoin Cash's avalanche
380 // preconsensus mechanism.
381 NODE_AVALANCHE = (1 << 24),
382};
383
389std::vector<std::string> serviceFlagsToStr(const uint64_t flags);
390
416
421void SetServiceFlagsIBDCache(bool status);
422
428static inline bool HasAllDesirableServiceFlags(ServiceFlags services) {
429 return !(GetDesirableServiceFlags(services) & (~services));
430}
431
436static inline bool MayHaveUsefulAddressDB(ServiceFlags services) {
437 return (services & NODE_NETWORK) || (services & NODE_NETWORK_LIMITED);
438}
439
443class CAddress : public CService {
444 static constexpr auto TIME_INIT{100000000s};
445
465 static constexpr uint32_t DISK_VERSION_INIT{220000};
466 static constexpr uint32_t DISK_VERSION_IGNORE_MASK{
467 0b00000000'00000111'11111111'11111111};
474 static constexpr uint32_t DISK_VERSION_ADDRV2{1 << 29};
475 static_assert(
476 (DISK_VERSION_INIT & ~DISK_VERSION_IGNORE_MASK) == 0,
477 "DISK_VERSION_INIT must be covered by DISK_VERSION_IGNORE_MASK");
478 static_assert(
480 "DISK_VERSION_ADDRV2 must not be covered by DISK_VERSION_IGNORE_MASK");
481
482public:
484 CAddress(CService ipIn, ServiceFlags nServicesIn)
485 : CService{ipIn}, nServices{nServicesIn} {};
486 CAddress(CService ipIn, ServiceFlags nServicesIn, NodeSeconds time)
487 : CService{ipIn}, nTime{time}, nServices{nServicesIn} {};
488
490 // CAddress has a distinct network serialization and a disk
491 // serialization, but it should never be hashed (except through
492 // CHashWriter in addrdb.cpp, which sets SER_DISK), and it's ambiguous
493 // what that would mean. Make sure no code relying on that is
494 // introduced:
495 assert(!(s.GetType() & SER_GETHASH));
496 bool use_v2;
497 if (s.GetType() & SER_DISK) {
498 // In the disk serialization format, the encoding (v1 or v2) is
499 // determined by a flag version that's part of the serialization
500 // itself. ADDRV2_FORMAT in the stream version only determines
501 // whether V2 is chosen/permitted at all.
502 uint32_t stored_format_version = DISK_VERSION_INIT;
503 if (s.GetVersion() & ADDRV2_FORMAT) {
504 stored_format_version |= DISK_VERSION_ADDRV2;
505 }
506 READWRITE(stored_format_version);
507 stored_format_version &=
508 ~DISK_VERSION_IGNORE_MASK; // ignore low bits
509 if (stored_format_version == 0) {
510 use_v2 = false;
511 } else if (stored_format_version == DISK_VERSION_ADDRV2 &&
512 (s.GetVersion() & ADDRV2_FORMAT)) {
513 // Only support v2 deserialization if ADDRV2_FORMAT is set.
514 use_v2 = true;
515 } else {
516 throw std::ios_base::failure(
517 "Unsupported CAddress disk format version");
518 }
519 } else {
520 // In the network serialization format, the encoding (v1 or v2) is
521 // determined directly by the value of ADDRV2_FORMAT in the stream
522 // version, as no explicitly encoded version exists in the stream.
523 assert(s.GetType() & SER_NETWORK);
524 use_v2 = s.GetVersion() & ADDRV2_FORMAT;
525 }
526
528 // nServices is serialized as CompactSize in V2; as uint64_t in V1.
529 if (use_v2) {
530 uint64_t services_tmp;
531 SER_WRITE(obj, services_tmp = obj.nServices);
533 SER_READ(obj,
534 obj.nServices = static_cast<ServiceFlags>(services_tmp));
535 } else {
536 READWRITE(Using<CustomUintFormatter<8>>(obj.nServices));
537 }
538 // Invoke V1/V2 serializer for CService parent object.
539 OverrideStream<Stream> os(&s, s.GetType(), use_v2 ? ADDRV2_FORMAT : 0);
540 SerReadWriteMany(os, ser_action, ReadWriteAsHelper<CService>(obj));
541 }
542
548
549 friend bool operator==(const CAddress &a, const CAddress &b) {
550 return a.nTime == b.nTime && a.nServices == b.nServices &&
551 static_cast<const CService &>(a) ==
552 static_cast<const CService &>(b);
553 }
554};
555
557const uint32_t MSG_TYPE_MASK = 0xffffffff >> 3;
558
568 // The following can only occur in getdata. Invs always use TX or BLOCK.
573 MSG_AVA_PROOF = 0x1f000001,
575};
576
582class CInv {
583public:
584 uint32_t type;
586
587 CInv() : type(0), hash() {}
588 CInv(uint32_t typeIn, const uint256 &hashIn) : type(typeIn), hash(hashIn) {}
589
590 SERIALIZE_METHODS(CInv, obj) { READWRITE(obj.type, obj.hash); }
591
592 friend bool operator<(const CInv &a, const CInv &b) {
593 return a.type < b.type || (a.type == b.type && a.hash < b.hash);
594 }
595
596 std::string GetMessageType() const;
597 std::string ToString() const;
598
599 uint32_t GetKind() const { return type & MSG_TYPE_MASK; }
600
601 bool IsMsgTx() const {
602 auto k = GetKind();
603 return k == MSG_TX;
604 }
605 bool IsMsgProof() const {
606 auto k = GetKind();
607 return k == MSG_AVA_PROOF;
608 }
609 bool IsMsgStakeContender() const {
610 auto k = GetKind();
611 return k == MSG_AVA_STAKE_CONTENDER;
612 }
613 bool IsMsgBlk() const {
614 auto k = GetKind();
615 return k == MSG_BLOCK;
616 }
617 bool IsMsgFilteredBlk() const {
618 auto k = GetKind();
619 return k == MSG_FILTERED_BLOCK;
620 }
621 bool IsMsgCmpctBlk() const {
622 auto k = GetKind();
623 return k == MSG_CMPCT_BLOCK;
624 }
625
626 bool IsGenBlkMsg() const {
627 auto k = GetKind();
628 return k == MSG_BLOCK || k == MSG_FILTERED_BLOCK ||
629 k == MSG_CMPCT_BLOCK;
630 }
631};
632
633#endif // BITCOIN_PROTOCOL_H
int flags
Definition: bitcoin-tx.cpp:542
A CService with information about it as peer.
Definition: protocol.h:443
static constexpr uint32_t DISK_VERSION_IGNORE_MASK
Definition: protocol.h:466
SERIALIZE_METHODS(CAddress, obj)
Definition: protocol.h:489
CAddress(CService ipIn, ServiceFlags nServicesIn, NodeSeconds time)
Definition: protocol.h:486
ServiceFlags nServices
Serialized as uint64_t in V1, and as CompactSize in V2.
Definition: protocol.h:547
NodeSeconds nTime
Always included in serialization, except in the network format on INIT_PROTO_VERSION.
Definition: protocol.h:545
static constexpr uint32_t DISK_VERSION_INIT
Historically, CAddress disk serialization stored the CLIENT_VERSION, optionally OR'ed with the ADDRV2...
Definition: protocol.h:465
CAddress()
Definition: protocol.h:483
friend bool operator==(const CAddress &a, const CAddress &b)
Definition: protocol.h:549
static constexpr auto TIME_INIT
Definition: protocol.h:444
CAddress(CService ipIn, ServiceFlags nServicesIn)
Definition: protocol.h:484
static constexpr uint32_t DISK_VERSION_ADDRV2
The version number written in disk serialized addresses to indicate V2 serializations.
Definition: protocol.h:474
Inv(ventory) message data.
Definition: protocol.h:582
std::string GetMessageType() const
Definition: protocol.cpp:219
bool IsMsgCmpctBlk() const
Definition: protocol.h:621
friend bool operator<(const CInv &a, const CInv &b)
Definition: protocol.h:592
uint32_t GetKind() const
Definition: protocol.h:599
bool IsMsgBlk() const
Definition: protocol.h:613
std::string ToString() const
Definition: protocol.cpp:242
CInv()
Definition: protocol.h:587
uint32_t type
Definition: protocol.h:584
CInv(uint32_t typeIn, const uint256 &hashIn)
Definition: protocol.h:588
bool IsMsgTx() const
Definition: protocol.h:601
bool IsMsgStakeContender() const
Definition: protocol.h:609
bool IsMsgFilteredBlk() const
Definition: protocol.h:617
uint256 hash
Definition: protocol.h:585
bool IsMsgProof() const
Definition: protocol.h:605
SERIALIZE_METHODS(CInv, obj)
Definition: protocol.h:590
bool IsGenBlkMsg() const
Definition: protocol.h:626
Message header.
Definition: protocol.h:34
static constexpr size_t MESSAGE_SIZE_OFFSET
Definition: protocol.h:40
static constexpr size_t CHECKSUM_OFFSET
Definition: protocol.h:42
bool IsValidWithoutConfig(const MessageMagic &magic) const
This is a transition method in order to stay compatible with older code that do not use the config.
Definition: protocol.cpp:180
std::array< char, MESSAGE_TYPE_SIZE > m_msg_type
Definition: protocol.h:71
bool IsValid(const Config &config) const
Definition: protocol.cpp:156
static constexpr size_t MESSAGE_TYPE_SIZE
Definition: protocol.h:37
static constexpr size_t CHECKSUM_SIZE
Definition: protocol.h:39
MessageMagic pchMessageStart
Definition: protocol.h:70
static constexpr size_t MESSAGE_SIZE_SIZE
Definition: protocol.h:38
std::string GetMessageType() const
Definition: protocol.cpp:120
bool IsOversized(const Config &config) const
Definition: protocol.cpp:197
static constexpr size_t HEADER_SIZE
Definition: protocol.h:44
uint8_t pchChecksum[CHECKSUM_SIZE]
Definition: protocol.h:73
static constexpr size_t MESSAGE_START_SIZE
Definition: protocol.h:36
CMessageHeader(const MessageMagic &pchMessageStartIn)
Definition: protocol.cpp:91
SERIALIZE_METHODS(CMessageHeader, obj)
Definition: protocol.h:65
uint32_t nMessageSize
Definition: protocol.h:72
std::array< uint8_t, MESSAGE_START_SIZE > MessageMagic
Definition: protocol.h:47
A combination of a network address (CNetAddr) and a (TCP) port.
Definition: netaddress.h:545
Definition: config.h:19
256-bit opaque blob.
Definition: uint256.h:129
Bitcoin protocol message types.
Definition: protocol.cpp:17
bool IsBlockLike(const std::string &strCommand)
Indicate if the message is used to transmit the content of a block.
Definition: protocol.cpp:60
const char * FILTERLOAD
The filterload message tells the receiving peer to filter all relayed transactions and requested merk...
Definition: protocol.cpp:36
const char * CFHEADERS
cfheaders is a response to a getcfheaders request containing a filter header and a vector of filter h...
Definition: protocol.cpp:48
const char * AVAPROOFSREQ
Request for missing avalanche proofs after an avaproofs message has been processed.
Definition: protocol.cpp:58
const char * CFILTER
cfilter is a response to a getcfilters request containing a single compact filter.
Definition: protocol.cpp:46
const char * BLOCK
The block message transmits a single serialized block.
Definition: protocol.cpp:30
const char * FILTERCLEAR
The filterclear message tells the receiving peer to remove a previously-set bloom filter.
Definition: protocol.cpp:38
const char * HEADERS
The headers message sends one or more block headers to a node which previously requested certain head...
Definition: protocol.cpp:29
const char * ADDRV2
The addrv2 message relays connection information for peers on the network just like the addr message,...
Definition: protocol.cpp:21
const char * SENDHEADERS
Indicates that a node prefers to receive new block announcements via a "headers" message rather than ...
Definition: protocol.cpp:39
const char * AVAPROOFS
The avaproofs message the proof short ids of all the valid proofs that we know.
Definition: protocol.cpp:57
const char * PONG
The pong message replies to a ping message, proving to the pinging node that the ponging node is stil...
Definition: protocol.cpp:34
const char * GETAVAPROOFS
The getavaproofs message requests an avaproofs message that provides the proof short ids of all the v...
Definition: protocol.cpp:56
const char * SENDCMPCT
Contains a 1-byte bool and 8-byte LE version number.
Definition: protocol.cpp:41
const char * GETADDR
The getaddr message requests an addr message from the receiving node, preferably one with lots of IP ...
Definition: protocol.cpp:31
const char * GETCFCHECKPT
getcfcheckpt requests evenly spaced compact filter headers, enabling parallelized download and valida...
Definition: protocol.cpp:49
const char * NOTFOUND
The notfound message is a reply to a getdata message which requested an object the receiving node doe...
Definition: protocol.cpp:35
const char * GETAVAADDR
The getavaaddr message requests an addr message from the receiving node, containing IP addresses of t...
Definition: protocol.cpp:55
const char * CMPCTBLOCK
Contains a CBlockHeaderAndShortTxIDs object - providing a header and list of "short txids".
Definition: protocol.cpp:42
const char * MEMPOOL
The mempool message requests the TXIDs of transactions that the receiving node has verified as valid ...
Definition: protocol.cpp:32
const char * GETCFILTERS
getcfilters requests compact filters for a range of blocks.
Definition: protocol.cpp:45
const char * TX
The tx message transmits a single transaction.
Definition: protocol.cpp:28
const char * AVAHELLO
Contains a delegation and a signature.
Definition: protocol.cpp:51
const char * FILTERADD
The filteradd message tells the receiving peer to add a single element to a previously-set bloom filt...
Definition: protocol.cpp:37
const char * ADDR
The addr (IP address) message relays connection information for peers on the network.
Definition: protocol.cpp:20
const char * VERSION
The version message provides information about the transmitting node to the receiving node at the beg...
Definition: protocol.cpp:18
const char * GETBLOCKS
The getblocks message requests an inv message that provides block header hashes starting from a parti...
Definition: protocol.cpp:26
const char * FEEFILTER
The feefilter message tells the receiving peer not to inv us any txs which do not meet the specified ...
Definition: protocol.cpp:40
const char * GETHEADERS
The getheaders message requests a headers message that provides block headers starting from a particu...
Definition: protocol.cpp:27
const char * AVARESPONSE
Contains an avalanche::Response.
Definition: protocol.cpp:53
const char * GETDATA
The getdata message requests one or more data objects from another node.
Definition: protocol.cpp:24
const char * VERACK
The verack message acknowledges a previously-received version message, informing the connecting node ...
Definition: protocol.cpp:19
const char * BLOCKTXN
Contains a BlockTransactions.
Definition: protocol.cpp:44
const char * GETCFHEADERS
getcfheaders requests a compact filter header and the filter hashes for a range of blocks,...
Definition: protocol.cpp:47
const char * SENDADDRV2
The sendaddrv2 message signals support for receiving ADDRV2 messages (BIP155).
Definition: protocol.cpp:22
const char * PING
The ping message is sent periodically to help confirm that the receiving peer is still connected.
Definition: protocol.cpp:33
const char * AVAPOLL
Contains an avalanche::Poll.
Definition: protocol.cpp:52
const char * MERKLEBLOCK
The merkleblock message is a reply to a getdata message which requested a block using the inventory t...
Definition: protocol.cpp:25
const char * AVAPROOF
Contains an avalanche::Proof.
Definition: protocol.cpp:54
const char * CFCHECKPT
cfcheckpt is a response to a getcfcheckpt request containing a vector of evenly spaced filter headers...
Definition: protocol.cpp:50
const char * GETBLOCKTXN
Contains a BlockTransactionsRequest Peer should respond with "blocktxn" message.
Definition: protocol.cpp:43
const char * INV
The inv message (inventory message) transmits one or more inventories of objects known to the transmi...
Definition: protocol.cpp:23
static constexpr int ADDRV2_FORMAT
A flag that is ORed into the protocol version to designate that addresses should be serialized in (un...
Definition: netaddress.h:33
const std::vector< std::string > & getAllNetMessageTypes()
Get a vector of all valid message types (see above)
Definition: protocol.cpp:250
std::vector< std::string > serviceFlagsToStr(const uint64_t flags)
Convert service flags (a bitmask of NODE_*) to human readable strings.
Definition: protocol.cpp:287
ServiceFlags GetDesirableServiceFlags(ServiceFlags services)
Gets the set of service flags which are "desirable" for a given peer.
Definition: protocol.cpp:207
static const unsigned int MAX_PROTOCOL_MESSAGE_LENGTH
Maximum length of incoming protocol messages (Currently 2MB).
Definition: protocol.h:25
static bool HasAllDesirableServiceFlags(ServiceFlags services)
A shortcut for (services & GetDesirableServiceFlags(services)) == GetDesirableServiceFlags(services),...
Definition: protocol.h:428
GetDataMsg
getdata / inv message types.
Definition: protocol.h:564
@ MSG_TX
Definition: protocol.h:566
@ MSG_FILTERED_BLOCK
Defined in BIP37.
Definition: protocol.h:570
@ MSG_AVA_STAKE_CONTENDER
Definition: protocol.h:574
@ MSG_AVA_PROOF
Definition: protocol.h:573
@ MSG_BLOCK
Definition: protocol.h:567
@ UNDEFINED
Definition: protocol.h:565
@ MSG_CMPCT_BLOCK
Defined in BIP152.
Definition: protocol.h:572
void SetServiceFlagsIBDCache(bool status)
Set the current IBD status in order to figure out the desirable service flags.
Definition: protocol.cpp:215
const uint32_t MSG_TYPE_MASK
getdata message type flags
Definition: protocol.h:557
ServiceFlags
nServices flags.
Definition: protocol.h:336
@ NODE_NONE
Definition: protocol.h:339
@ NODE_GETUTXO
Definition: protocol.h:348
@ NODE_NETWORK_LIMITED
Definition: protocol.h:366
@ NODE_BLOOM
Definition: protocol.h:353
@ NODE_NETWORK
Definition: protocol.h:343
@ NODE_LAST_NON_EXPERIMENTAL_SERVICE_BIT
Definition: protocol.h:369
@ NODE_COMPACT_FILTERS
Definition: protocol.h:361
@ NODE_AVALANCHE
Definition: protocol.h:381
static bool MayHaveUsefulAddressDB(ServiceFlags services)
Checks if a peer with the given service flags may be capable of having a robust address-storage DB.
Definition: protocol.h:436
#define SER_WRITE(obj, code)
Definition: serialize.h:173
@ SER_DISK
Definition: serialize.h:153
@ SER_NETWORK
Definition: serialize.h:152
@ SER_GETHASH
Definition: serialize.h:154
void SerReadWriteMany(Stream &s, CSerActionSerialize ser_action, const Args &...args)
Definition: serialize.h:1219
#define SER_READ(obj, code)
Definition: serialize.h:169
static Wrapper< Formatter, T & > Using(T &&t)
Cause serialization/deserialization of an object to be done using a specified formatter class.
Definition: serialize.h:574
#define READWRITE(...)
Definition: serialize.h:166
Formatter for integers in CompactSize format.
Definition: serialize.h:647
Serialization wrapper class for custom integers and enums.
Definition: serialize.h:606
std::chrono::time_point< NodeClock, std::chrono::seconds > NodeSeconds
Definition: time.h:25
assert(!tx.IsCoinBase())