From 1cd8dd93c638f12525fd646759c41577518d9da6 Mon Sep 17 00:00:00 2001 From: Arjan Zijderveld <5286904+arjanz@users.noreply.github.com> Date: Thu, 11 Apr 2024 16:11:07 +0200 Subject: [PATCH] Use authority set of parent hash to determine block author (#386) --- substrateinterface/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/substrateinterface/base.py b/substrateinterface/base.py index 2ca7788..7e9316d 100644 --- a/substrateinterface/base.py +++ b/substrateinterface/base.py @@ -2355,7 +2355,8 @@ def decode_block(block_data, block_data_hash=None): engine = bytes(log_digest[1][0]) # Retrieve validator set - validator_set = self.query("Session", "Validators", block_hash=block_hash) + parent_hash = block_data['header']['parentHash'] + validator_set = self.query("Session", "Validators", block_hash=parent_hash) if engine == b'BABE': babe_predigest = self.runtime_config.create_scale_object(