Skip to content

Commit

Permalink
806 Add PL flag
Browse files Browse the repository at this point in the history
  • Loading branch information
kladkogex committed Feb 24, 2025
1 parent 9404d3e commit 439ec79
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions node/ConsensusInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ enum consensus_engine_status {


using u256 = boost::multiprecision::number<boost::multiprecision::backends::cpp_int_backend<256,
256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >;
256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void> >;

class ConsensusInterface {
public:
Expand All @@ -58,7 +58,7 @@ class ConsensusInterface {
, const std::string &_fullPathToFutureConfigFile
#endif
#ifndef PL
// L1 does implement Oracle
// PL does implement Oracle
, const string &gethURL
#endif
) = 0;
Expand Down Expand Up @@ -95,13 +95,12 @@ class ConsensusInterface {

virtual uint64_t getEmptyBlockIntervalMs() const { return -1; }

virtual void setEmptyBlockIntervalMs(uint64_t) {
}
virtual void setEmptyBlockIntervalMs(uint64_t) {}

virtual consensus_engine_status getStatus() const = 0;

#ifndef PL
// L1 does implement Oracle
// PL does implement Oracle
#define ORACLE_SUCCESS 0
#define ORACLE_UNKNOWN_RECEIPT 1
#define ORACLE_TIMEOUT 2
Expand Down Expand Up @@ -167,7 +166,6 @@ class ConsensusInterface {
#define ORACLE_PARAMS_NO_ARRAY 61
#define ORACLE_PARAMS_GAS_NOT_UINT64 62


/*
* Submit Oracle Request. This will return ORACLE_SUCCESS and a string receipt if everything
* is. In case of an error, a non-zero error will be returned.
Expand All @@ -176,7 +174,7 @@ class ConsensusInterface {
*/

virtual uint64_t submitOracleRequest(
const string &_spec, string &_receipt, string &_errorMessage) = 0;
const string &_spec, string &_receipt, string &_errorMessage) = 0;

/*
* Check if Oracle result has been derived. This will return ORACLE_SUCCESS if
Expand All @@ -203,13 +201,14 @@ class ConsensusInterface {

std::string toString() {
return std::to_string(isSyncing) + ":" + std::to_string(startingBlock) + ":" +
std::to_string(currentBlock) + ":" + std::to_string(highestBlock);
std::to_string(currentBlock) + ":" + std::to_string(highestBlock);
}
};

// return sync information as requested by eth_syncing API of geth
// if isSyncing is false, all fields will be set to zero.
virtual SyncInfo getSyncInfo() = 0;

};

/**
Expand All @@ -229,8 +228,7 @@ class ConsensusExtFace {

virtual ~ConsensusExtFace() = default;

virtual void terminateApplication() {
};
virtual void terminateApplication() {};
};

#endif // CONSENSUSINTERFACE_H

0 comments on commit 439ec79

Please sign in to comment.