mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
52 lines
1.3 KiB
C++
52 lines
1.3 KiB
C++
#ifndef __TRANSACTIONMETA__
|
|
#define __TRANSACTIONMETA__
|
|
|
|
#include <vector>
|
|
|
|
#include <boost/shared_ptr.hpp>
|
|
#include <boost/ptr_container/ptr_vector.hpp>
|
|
|
|
#include "../json/value.h"
|
|
|
|
#include "uint256.h"
|
|
#include "Serializer.h"
|
|
#include "SerializedTypes.h"
|
|
#include "SerializedObject.h"
|
|
|
|
class TransactionMetaSet
|
|
{
|
|
public:
|
|
typedef boost::shared_ptr<TransactionMetaSet> pointer;
|
|
|
|
protected:
|
|
uint256 mTransactionID;
|
|
uint32 mLedger;
|
|
|
|
STArray mNodes;
|
|
|
|
public:
|
|
TransactionMetaSet() : mLedger(0) { ; }
|
|
TransactionMetaSet(const uint256& txID, uint32 ledger) : mTransactionID(txID), mLedger(ledger) { ; }
|
|
TransactionMetaSet(const uint256& txID, uint32 ledger, const std::vector<unsigned char>&);
|
|
|
|
void init(const uint256& transactionID, uint32 ledger);
|
|
void clear() { mNodes.clear(); }
|
|
void swap(TransactionMetaSet&);
|
|
|
|
const uint256& getTxID() { return mTransactionID; }
|
|
uint32 getLgrSeq() { return mLedger; }
|
|
|
|
bool isNodeAffected(const uint256&) const;
|
|
STObject& getAffectedNode(const uint256&, SField::ref type, bool overrideType);
|
|
const STObject& peekAffectedNode(const uint256&) const;
|
|
|
|
Json::Value getJson(int p) const { return mNodes.getJson(p); }
|
|
void addRaw(Serializer&);
|
|
|
|
static bool thread(STObject& node, const uint256& prevTxID, uint32 prevLgrID);
|
|
};
|
|
|
|
#endif
|
|
|
|
// vim:ts=4
|