Skip to content

Commit

Permalink
Added proof_size to Weight encoding #271
Browse files Browse the repository at this point in the history
(cherry picked from commit 18feefb)
  • Loading branch information
arjanz committed Nov 24, 2022
1 parent cfdc6da commit f94adac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion substrateinterface/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2132,7 +2132,10 @@ def get_payment_info(self, call: GenericCall, keypair: Keypair):
# Transform format to WeightV2 if applicable as per https://github.com/paritytech/substrate/pull/12633
weight_obj = self.runtime_config.create_scale_object("sp_weights::weight_v2::Weight")
if weight_obj is not None:
payment_info['result']['weight'] = {'ref_time': payment_info['result']['weight']}
payment_info['result']['weight'] = {
'ref_time': payment_info['result']['weight'],
'proof_size': 0
}

return payment_info['result']
else:
Expand Down

0 comments on commit f94adac

Please sign in to comment.