2016-03-02 22:20:04 +01:00
|
|
|
// 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:
|
2017-09-19 16:51:38 +02:00
|
|
|
CDSNotificationInterface(CConnman& connmanIn): connman(connmanIn) {}
|
2017-08-29 01:51:33 +02:00
|
|
|
virtual ~CDSNotificationInterface() = default;
|
|
|
|
|
|
|
|
// a small helper to initialize current block height in sub-modules on startup
|
|
|
|
void InitializeCurrentBlockTip();
|
2016-03-02 22:20:04 +01:00
|
|
|
|
|
|
|
protected:
|
|
|
|
// CValidationInterface
|
2017-09-03 15:30:08 +02:00
|
|
|
void AcceptedBlockHeader(const CBlockIndex *pindexNew) override;
|
|
|
|
void NotifyHeaderTip(const CBlockIndex *pindexNew, bool fInitialDownload) override;
|
2017-08-29 01:51:33 +02:00
|
|
|
void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) override;
|
2018-02-15 08:29:15 +01:00
|
|
|
void SyncTransaction(const CTransaction &tx, const CBlockIndex *pindex, int posInBlock) override;
|
2019-04-09 13:26:33 +02:00
|
|
|
void NotifyMasternodeListChanged(bool undo, const CDeterministicMNList& oldMNList, const CDeterministicMNListDiff& diff) override;
|
2019-03-04 07:57:51 +01:00
|
|
|
void NotifyChainLock(const CBlockIndex* pindex) override;
|
2016-03-02 22:20:04 +01:00
|
|
|
|
|
|
|
private:
|
2017-09-19 16:51:38 +02:00
|
|
|
CConnman& connman;
|
2016-03-02 22:20:04 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // BITCOIN_DSNOTIFICATIONINTERFACE_H
|