mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
updated tonlib
1. updated tonlib 2. fixed bug in state download
This commit is contained in:
parent
f40822b58a
commit
28df74178c
17 changed files with 362 additions and 115 deletions
|
@ -258,6 +258,7 @@ td::Result<Transaction::Info> Transaction::validate() {
|
|||
}
|
||||
Info res;
|
||||
res.blkid = blkid;
|
||||
res.now = trans.now;
|
||||
res.prev_trans_lt = trans.prev_trans_lt;
|
||||
res.prev_trans_hash = trans.prev_trans_hash;
|
||||
res.transaction = root;
|
||||
|
@ -281,6 +282,8 @@ td::Result<TransactionList::Info> TransactionList::validate() const {
|
|||
Info res;
|
||||
auto current_lt = lt;
|
||||
auto current_hash = hash;
|
||||
res.lt = lt;
|
||||
res.hash = hash;
|
||||
for (auto& root : list) {
|
||||
const auto& blkid = blkids[c++];
|
||||
Transaction transaction;
|
||||
|
|
|
@ -60,6 +60,7 @@ struct Transaction {
|
|||
|
||||
struct Info {
|
||||
ton::BlockIdExt blkid;
|
||||
td::uint32 now;
|
||||
ton::LogicalTime prev_trans_lt;
|
||||
ton::Bits256 prev_trans_hash;
|
||||
td::Ref<vm::Cell> transaction;
|
||||
|
@ -74,21 +75,12 @@ struct TransactionList {
|
|||
td::BufferSlice transactions_boc;
|
||||
|
||||
struct Info {
|
||||
ton::LogicalTime lt;
|
||||
ton::Bits256 hash;
|
||||
std::vector<Transaction::Info> transactions;
|
||||
};
|
||||
|
||||
td::Result<Info> validate() const;
|
||||
};
|
||||
|
||||
struct BlockChain {
|
||||
ton::BlockIdExt from;
|
||||
ton::BlockIdExt to;
|
||||
td::int32 mode;
|
||||
td::BufferSlice proof;
|
||||
|
||||
using Info = std::unique_ptr<block::BlockProofChain>;
|
||||
|
||||
td::Result<Info> validate() const;
|
||||
};
|
||||
|
||||
} // namespace block
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue