Bitcoin ABC 0.32.12
P2P Digital Currency
node.h
Go to the documentation of this file.
1// Copyright (c) 2018-2019 The Bitcoin developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_AVALANCHE_NODE_H
6#define BITCOIN_AVALANCHE_NODE_H
7
8#include <nodeid.h>
9#include <pubkey.h>
10#include <util/time.h>
11
12#include <chrono>
13#include <cstdint>
14
15using PeerId = uint32_t;
16static constexpr PeerId NO_PEER = -1;
17
18namespace avalanche {
19
20struct Node {
24 bool avaproofsSent{false};
25 uint64_t last_round{0};
26
27 Node(NodeId nodeid_, PeerId peerid_)
28 : nodeid(nodeid_), peerid(peerid_),
30};
31
32} // namespace avalanche
33
34#endif // BITCOIN_AVALANCHE_NODE_H
static constexpr PeerId NO_PEER
Definition: node.h:16
uint32_t PeerId
Definition: node.h:15
int64_t NodeId
Definition: eviction.h:16
uint64_t last_round
Definition: node.h:25
PeerId peerid
Definition: node.h:22
SteadyMilliseconds nextRequestTime
Definition: node.h:23
NodeId nodeid
Definition: node.h:21
bool avaproofsSent
Definition: node.h:24
Node(NodeId nodeid_, PeerId peerid_)
Definition: node.h:27
constexpr T Now()
Return the current time point cast to the given precision.
Definition: time.h:113
std::chrono::time_point< std::chrono::steady_clock, std::chrono::milliseconds > SteadyMilliseconds
Definition: time.h:33