eos 的延迟交易示例

According to the genesis block file. The maximum delay for a deferred transaction is 3888000.

"max_transaction_delay": 3888000,

 

What is sender_id param in send_deferred function?

问题: I tried to implement repeated execution of particular action and set this param as _self of calling contract, but the transaction gets executed only once in this case. Then i tried to set it as time() and it worked, so has it to be unique?

答案:

The sender_id is just a value set by the contract that sends the deferred transaction so that later operations can refer to the same transaction. The semantics are:

  • sending a new transaction with the same sender_id as one in-flight will replace the in-flight transaction
  • canceling a transaction can be achieved by passing that sender_id into cancel_deferred

So, if you want to have N transactions in-flight at the same time they need N unique ID's

 

 

 

https://github.com/CryptoLions/EOS-MainNet/blob/master/genesis.json

https://eosio.stackexchange.com/questions/404/what-is-sender-id-param-in-send-deferred-function

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值