mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
updated smartcontract code
- updated smartcontract code - fixed bug in liteserver listening socket - updated documentation
This commit is contained in:
parent
38c3e39066
commit
b978e27b2f
63 changed files with 3185 additions and 81 deletions
|
@ -26,6 +26,7 @@
|
|||
#include <ostream>
|
||||
#include "tl/tlblib.hpp"
|
||||
#include "td/utils/bits.h"
|
||||
#include "td/utils/CancellationToken.h"
|
||||
#include "td/utils/StringBuilder.h"
|
||||
#include "ton/ton-types.h"
|
||||
|
||||
|
@ -162,12 +163,12 @@ struct MsgProcessedUpto {
|
|||
MsgProcessedUpto(ton::ShardId _shard, ton::BlockSeqno _mcseqno, ton::LogicalTime _lt, td::ConstBitPtr _hash)
|
||||
: shard(_shard), mc_seqno(_mcseqno), last_inmsg_lt(_lt), last_inmsg_hash(_hash) {
|
||||
}
|
||||
bool operator<(const MsgProcessedUpto& other) const & {
|
||||
bool operator<(const MsgProcessedUpto& other) const& {
|
||||
return shard < other.shard || (shard == other.shard && mc_seqno < other.mc_seqno);
|
||||
}
|
||||
bool contains(const MsgProcessedUpto& other) const &;
|
||||
bool contains(const MsgProcessedUpto& other) const&;
|
||||
bool contains(ton::ShardId other_shard, ton::LogicalTime other_lt, td::ConstBitPtr other_hash,
|
||||
ton::BlockSeqno other_mc_seqno) const &;
|
||||
ton::BlockSeqno other_mc_seqno) const&;
|
||||
// NB: this is for checking whether we have already imported an internal message
|
||||
bool already_processed(const EnqueuedMsgDescr& msg) const;
|
||||
};
|
||||
|
@ -573,7 +574,7 @@ struct BlockProofChain {
|
|||
bool last_link_incomplete() const {
|
||||
return !links.empty() && last_link().incomplete();
|
||||
}
|
||||
td::Status validate();
|
||||
td::Status validate(td::CancellationToken cancellation_token = {});
|
||||
};
|
||||
|
||||
int filter_out_msg_queue(vm::AugmentedDictionary& out_queue, ton::ShardIdFull old_shard, ton::ShardIdFull subshard);
|
||||
|
|
|
@ -424,7 +424,7 @@ td::Status BlockProofLink::validate(td::uint32* save_utime) const {
|
|||
}
|
||||
}
|
||||
|
||||
td::Status BlockProofChain::validate() {
|
||||
td::Status BlockProofChain::validate(td::CancellationToken cancellation_token) {
|
||||
valid = false;
|
||||
has_key_block = false;
|
||||
has_utime = false;
|
||||
|
@ -450,6 +450,9 @@ td::Status BlockProofChain::validate() {
|
|||
<< link.from.to_str() << " but the previous link ends at different block "
|
||||
<< cur.to_str());
|
||||
}
|
||||
if (cancellation_token) {
|
||||
return td::Status::Error("Cancelled");
|
||||
}
|
||||
auto err = link.validate(&last_utime);
|
||||
if (err.is_error()) {
|
||||
return td::Status::Error(PSTRING() << "link #" << i << " in BlockProofChain is invalid: " << err.to_string());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue