Skip to content

Commit 1cd8dd9

Browse files
authored
Use authority set of parent hash to determine block author (#386)
1 parent 84485c1 commit 1cd8dd9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

substrateinterface/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2355,7 +2355,8 @@ def decode_block(block_data, block_data_hash=None):
23552355

23562356
engine = bytes(log_digest[1][0])
23572357
# Retrieve validator set
2358-
validator_set = self.query("Session", "Validators", block_hash=block_hash)
2358+
parent_hash = block_data['header']['parentHash']
2359+
validator_set = self.query("Session", "Validators", block_hash=parent_hash)
23592360

23602361
if engine == b'BABE':
23612362
babe_predigest = self.runtime_config.create_scale_object(

0 commit comments

Comments
 (0)