mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
bugfix in validator
This commit is contained in:
parent
54b40df4aa
commit
c300b4ff30
5 changed files with 93 additions and 44 deletions
|
@ -596,6 +596,36 @@ bool MsgProcessedUptoCollection::for_each_mcseqno(std::function<bool(ton::BlockS
|
|||
return true;
|
||||
}
|
||||
|
||||
std::ostream& MsgProcessedUpto::print(std::ostream& os) const {
|
||||
return os << "[" << ton::shard_to_str(shard) << "," << mc_seqno << "," << last_inmsg_lt << ","
|
||||
<< last_inmsg_hash.to_hex() << "]";
|
||||
}
|
||||
|
||||
std::ostream& MsgProcessedUptoCollection::print(std::ostream& os) const {
|
||||
os << "MsgProcessedUptoCollection of " << owner.to_str() << " = {";
|
||||
int i = 0;
|
||||
for (const auto& entry : list) {
|
||||
if (i++) {
|
||||
os << ", ";
|
||||
}
|
||||
os << entry;
|
||||
}
|
||||
os << "}";
|
||||
return os;
|
||||
}
|
||||
|
||||
std::string MsgProcessedUpto::to_str() const {
|
||||
std::ostringstream os;
|
||||
print(os);
|
||||
return os.str();
|
||||
}
|
||||
|
||||
std::string MsgProcessedUptoCollection::to_str() const {
|
||||
std::ostringstream os;
|
||||
print(os);
|
||||
return os.str();
|
||||
}
|
||||
|
||||
// unpacks some fields from EnqueuedMsg
|
||||
bool EnqueuedMsgDescr::unpack(vm::CellSlice& cs) {
|
||||
block::gen::EnqueuedMsg::Record enq;
|
||||
|
|
|
@ -174,8 +174,14 @@ struct MsgProcessedUpto {
|
|||
bool can_check_processed() const {
|
||||
return (bool)compute_shard_end_lt;
|
||||
}
|
||||
std::ostream& print(std::ostream& os) const;
|
||||
std::string to_str() const;
|
||||
};
|
||||
|
||||
static inline std::ostream& operator<<(std::ostream& os, const MsgProcessedUpto& proc) {
|
||||
return proc.print(os);
|
||||
}
|
||||
|
||||
struct MsgProcessedUptoCollection {
|
||||
ton::ShardIdFull owner;
|
||||
bool valid{false};
|
||||
|
@ -202,8 +208,14 @@ struct MsgProcessedUptoCollection {
|
|||
bool already_processed(const EnqueuedMsgDescr& msg) const;
|
||||
bool can_check_processed() const;
|
||||
bool for_each_mcseqno(std::function<bool(ton::BlockSeqno)>) const;
|
||||
std::ostream& print(std::ostream& os) const;
|
||||
std::string to_str() const;
|
||||
};
|
||||
|
||||
static inline std::ostream& operator<<(std::ostream& os, const MsgProcessedUptoCollection& proc_coll) {
|
||||
return proc_coll.print(os);
|
||||
}
|
||||
|
||||
struct ParamLimits {
|
||||
enum { limits_cnt = 4 };
|
||||
enum { cl_underload = 0, cl_normal = 1, cl_soft = 2, cl_medium = 3, cl_hard = 4 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue