@@ -210,24 +210,35 @@ out:
210
210
var extIndex int
211
211
for idx , e := range block .Block .Extrinsics {
212
212
// Look for our submitted extrinsic in the block
213
- if ext .Signature .Signature .AsEcdsa .Hex () == e .Signature .Signature .AsEcdsa .Hex () {
213
+ extBytes , err := json .Marshal (ext )
214
+ if err != nil {
215
+ continue
216
+ }
217
+ extBytes = []byte (strings .Trim (string (extBytes ), "\" " ))
218
+
219
+ eBytes , err := json .Marshal (e )
220
+ if err != nil {
221
+ continue
222
+ }
223
+ eBytes = []byte (strings .Trim (string (eBytes ), "\" " ))
224
+ if string (extBytes ) == string (eBytes ) {
214
225
extIndex = idx
215
226
resp , err := http .Post (a .config .HttpApiURL , "application/json" ,
216
227
strings .NewReader (fmt .Sprintf ("{\" id\" :1,\" jsonrpc\" :\" 2.0\" ,\" method\" :\" kate_queryDataProofV2\" ,\" params\" :[%d, \" %#x\" ]}" , idx + 1 , blockHash ))) //nolint: noctx
217
228
if err != nil {
218
- return nil , nil , fmt . Errorf ( "cannot post query request" , err )
229
+ break
219
230
}
220
231
data , err := io .ReadAll (resp .Body )
221
232
if err != nil {
222
- return nil , nil , fmt . Errorf ( "cannot read body" , err )
233
+ break
223
234
}
224
235
err = resp .Body .Close ()
225
236
if err != nil {
226
- return nil , nil , fmt . Errorf ( "cannot close body" , err )
237
+ break
227
238
}
228
239
err = json .Unmarshal (data , & dataProofResp )
229
240
if err != nil {
230
- return nil , nil , fmt . Errorf ( "cannot unmarshal data proof: %w" , err )
241
+ break
231
242
}
232
243
233
244
if dataProofResp .Result .DataProof .Leaf == fmt .Sprintf ("%#x" , batchHash ) {
0 commit comments