danicoin/src/CryptoNoteProtocol/CryptoNoteProtocolHandlerCommon.h

28 lines
1.2 KiB
C
Raw Normal View History

// Copyright (c) 2011-2016 The Cryptonote developers
2014-03-03 22:07:58 +00:00
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#pragma once
2015-05-27 12:08:46 +00:00
namespace CryptoNote
2014-03-03 22:07:58 +00:00
{
2014-08-13 10:51:37 +00:00
struct NOTIFY_NEW_BLOCK_request;
struct NOTIFY_NEW_TRANSACTIONS_request;
2014-03-03 22:07:58 +00:00
/************************************************************************/
/* */
/************************************************************************/
2014-08-13 10:51:37 +00:00
struct i_cryptonote_protocol {
2015-05-27 12:08:46 +00:00
virtual void relay_block(NOTIFY_NEW_BLOCK_request& arg) = 0;
virtual void relay_transactions(NOTIFY_NEW_TRANSACTIONS_request& arg) = 0;
2014-03-03 22:07:58 +00:00
};
/************************************************************************/
/* */
/************************************************************************/
2014-08-13 10:51:37 +00:00
struct cryptonote_protocol_stub: public i_cryptonote_protocol {
2015-05-27 12:08:46 +00:00
virtual void relay_block(NOTIFY_NEW_BLOCK_request& arg) override {}
virtual void relay_transactions(NOTIFY_NEW_TRANSACTIONS_request& arg) override {}
2014-03-03 22:07:58 +00:00
};
}