-
Notifications
You must be signed in to change notification settings - Fork 100
/
Copy pathdsnotificationinterface.h
31 lines (24 loc) · 1.12 KB
/
dsnotificationinterface.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (c) 2015 The Bitcoin Core developers
// Copyright (c) 2019 Limxtec developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCORE_DSNOTIFICATIONINTERFACE_H
#define BITCORE_DSNOTIFICATIONINTERFACE_H
#include <validationinterface.h>
class CDSNotificationInterface : public CValidationInterface
{
public:
CDSNotificationInterface(CConnman& connmanIn): connman(connmanIn) {}
virtual ~CDSNotificationInterface() = default;
// a small helper to initialize current block height in sub-modules on startup
void InitializeCurrentBlockTip();
protected:
// CValidationInterface
void AcceptedBlockHeader(const CBlockIndex *pindexNew) override;
void NotifyHeaderTip(const CBlockIndex *pindexNew, bool fInitialDownload) override;
void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override;
void SyncTransaction(const CTransaction &tx, const CBlock *pblock) override;
private:
CConnman& connman;
};
#endif // BITCORE_DSNOTIFICATIONINTERFACE_H