diff --git a/Avalanche.h b/Avalanche.h new file mode 100644 index 0000000000..363aaf14ca --- /dev/null +++ b/Avalanche.h @@ -0,0 +1,37 @@ +#ifndef __AVALANCHE__ +#define __AVALANCHE__ + +#include +#include + +#include "Transaction.h" +#include "Hanko.h" + +class DisputedTransaction +{ +protected: + Transaction::pointer mTransaction; + std::vector mNodesIncluding; + std::vector mNodesRejecting; + uint64 mTimeTaken; // when we took our position on this transaction + bool mOurPosition; +}; + +class DTComp +{ +public: + bool operator()(const DisputedTransaction&, const DisputedTransaction&); +}; + +class Avalanche +{ +protected: + SHAMap::pointer mOurLedger; + std::map mTxByID; + std::set mTxInASOrder; + +public: + Avalanche(SHAMap::pointer ourLedger); +}; + +#endif