1
0
Fork 0
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:
ton 2020-04-03 18:47:22 +04:00
parent 54b40df4aa
commit c300b4ff30
5 changed files with 93 additions and 44 deletions

View file

@ -2,20 +2,23 @@
"TonUtil.fif" include
"Asm.fif" include
{ ."usage: " @' $0 type ." <workchain-id> <dest-addr> [<filename-base>]" cr
{ ."usage: " $0 type ." <workchain-id> <dest-addr> [<filename-base>]" cr
."Creates a new pinger in specified workchain, with destination address <dest-addr>. " cr
."Resulting initialization query is saved into <filename-base>-query.boc ('new-pinger-query.boc' by default)" cr 1 halt
} : usage
def? $# { @' $# dup 1 < swap 3 > or ' usage if } if
$# dup 1 < swap 3 > or ' usage if
3 :$1..n
Basechain 256 1<<1- 3 15 */ 2constant dest-addr
Basechain constant wc // create a wallet in workchain 0 (basechain)
def? $1 { @' $1 parse-workchain-id =: wc } if // set workchain id from command line argument
def? $2 { @' $2 false parse-load-address drop 2=: dest-addr } if
def? $3 { @' $3 } { "new-pinger" } cond constant file-base
$1 parse-workchain-id =: wc // set workchain id from command line argument
$2 dup null? { drop } { false parse-load-address drop 2=: dest-addr } cond
$3 "new-pinger" replace-if-null constant file-base
."Creating new pinger in workchain " wc . cr
."Address to ping is " dest-addr 2dup .addr ." = " 6 .Addr cr
// Create new simple pinger
<{ SETCP0 DUP INC 1 RSHIFT# 32 THROWIF // fail unless recv_internal or recv_external