我需要从 RIDE 脚本中知道区块链的当前高度,并在当前高度上或多或少地增加一周的高度。我试过这个:
let currentHeight = transactionHeightById(i.transactionId)
let finishHeight = currentHeight + (7*1440)
这是正确/最好的方法吗?此外,当尝试获取 finishHeight 时,我收到此错误:
编译失败:在 952-974 中找不到函数重载 '+'(Int|Unit, Int)
我需要从 RIDE 脚本中知道区块链的当前高度,并在当前高度上或多或少地增加一周的高度。我试过这个:
let currentHeight = transactionHeightById(i.transactionId)
let finishHeight = currentHeight + (7*1440)
这是正确/最好的方法吗?此外,当尝试获取 finishHeight 时,我收到此错误:
编译失败:在 952-974 中找不到函数重载 '+'(Int|Unit, Int)
RIDE 中当前的 WAVES 区块链高度包含在变量height中。因此,要了解当前高度并为其添加大约一周的时间(高度):
[...]
else if (contestStartHeight <= height) then throw("Start Height must be greater than current Blockchain height: " + toString(height))
else {
let contestFinishHeight = contestStartHeight + (7*1440)
}
[...]