mirror of
https://github.com/dashpay/dash.git
synced 2024-12-29 13:59:06 +01:00
31 lines
1.1 KiB
C++
31 lines
1.1 KiB
C++
// Copyright (c) 2015 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef BITCOIN_DSNOTIFICATIONINTERFACE_H
|
|
#define BITCOIN_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 CBlockIndex *pindex, int posInBlock);
|
|
|
|
private:
|
|
CConnman& connman;
|
|
};
|
|
|
|
#endif // BITCOIN_DSNOTIFICATIONINTERFACE_H
|