From b7b242bc6662693cbf29461ff54376d835357983 Mon Sep 17 00:00:00 2001 From: Hans Svensson Date: Wed, 7 Oct 2020 16:53:10 +0200 Subject: [PATCH] Document the (changed) behavior of Chain.block_hash --- docs/sophia_stdlib.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/sophia_stdlib.md b/docs/sophia_stdlib.md index 225c5f3..ee87a37 100644 --- a/docs/sophia_stdlib.md +++ b/docs/sophia_stdlib.md @@ -678,7 +678,12 @@ The balance of account `a`. Chain.block_hash(h : int) : option(bytes(32)) ``` -The hash of the block at height `h`. +The hash of the block at height `h`. `h` has to be within 256 blocks from the +current height of the chain or else the function will return `None`. + +NOTE: In AEVM and FATE VM version 1 `Chain.block_height` was not considered an +allowed height. From FATE VM version 2 (IRIS) it will return the block hash of +the current generation. #### block_height