Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tx validation state #13

Merged
merged 1 commit into from
Jan 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/vbk/pop_service.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ using BlockBytes = std::vector<uint8_t>;
struct PopService {
virtual ~PopService() = default;

virtual void clearTemporaryPayloads() = 0;

virtual void savePopTxToDatabase(const CBlock& block, const int& nHeight) = 0;

virtual std::vector<BlockBytes> getLastKnownVBKBlocks(size_t blocks) = 0;
Expand All @@ -45,12 +47,12 @@ struct PopService {

virtual void updateContext(const std::vector<std::vector<uint8_t>>& veriBlockBlocks, const std::vector<std::vector<uint8_t>>& bitcoinBlocks) = 0;

virtual bool parsePopTx(const CTransactionRef& tx, Publications* publications, Context* ctx, PopTxType* type) = 0;
virtual bool parsePopTx(const CTransactionRef& tx, ScriptError* serror, Publications* publications, Context* ctx, PopTxType* type) = 0;

virtual bool determineATVPlausibilityWithBTCRules(AltchainId altChainIdentifier, const CBlockHeader& popEndorsementHeader, const Consensus::Params& params) = 0;
virtual bool determineATVPlausibilityWithBTCRules(AltchainId altChainIdentifier, const CBlockHeader& popEndorsementHeader, const Consensus::Params& params, TxValidationState& state) = 0;

virtual void addPayloads(const CBlock& block, const int& nHeight, const Publications& publications) = 0;
virtual void removePayloads(const CBlock&, const int&) = 0;
virtual void addPayloads(std::string blockHash, const int& nHeight, const Publications& publications) = 0;
virtual void removePayloads(std::string blockHash, const int& blockHeight) = 0;
virtual void setConfig() = 0;
};
} // namespace VeriBlock
Expand Down
Loading