9
9
"math/big"
10
10
"net/http"
11
11
"net/http/httptest"
12
- "os"
13
12
"testing"
14
13
"time"
15
14
@@ -372,11 +371,10 @@ func TestDataApiGetDataProposerPayloadDelivered(t *testing.T) {
372
371
}
373
372
374
373
func TestBuilderSubmitBlockSSZ (t * testing.T ) {
375
- requestPayloadJSONBytes , err := os .ReadFile ("../../testdata/submitBlockPayloadCapella_Goerli.json" )
376
- require .NoError (t , err )
374
+ requestPayloadJSONBytes := common .LoadGzippedBytes (t , "../../testdata/submitBlockPayloadCapella_Goerli.json.gz" )
377
375
378
376
req := new (common.BuilderSubmitBlockRequest )
379
- err = json .Unmarshal (requestPayloadJSONBytes , & req )
377
+ err : = json .Unmarshal (requestPayloadJSONBytes , & req )
380
378
require .NoError (t , err )
381
379
382
380
reqSSZ , err := req .Capella .MarshalSSZ ()
@@ -397,7 +395,7 @@ func TestBuilderSubmitBlock(t *testing.T) {
397
395
submissionTimestamp := 1606824419
398
396
399
397
// Payload attributes
400
- payloadJSONFilename := "../../testdata/submitBlockPayloadCapella_Goerli.json"
398
+ payloadJSONFilename := "../../testdata/submitBlockPayloadCapella_Goerli.json.gz "
401
399
parentHash := "0xbd3291854dc822b7ec585925cda0e18f06af28fa2886e15f52d52dd4b6f94ed6"
402
400
feeRec , err := types .HexToAddress ("0x5cc0dde14e7256340cc820415a6022a7d1c93a35" )
403
401
require .NoError (t , err )
@@ -429,7 +427,7 @@ func TestBuilderSubmitBlock(t *testing.T) {
429
427
430
428
// Prepare the request payload
431
429
req := new (common.BuilderSubmitBlockRequest )
432
- requestPayloadJSONBytes , err := os . ReadFile ( payloadJSONFilename )
430
+ requestPayloadJSONBytes := common . LoadGzippedBytes ( t , payloadJSONFilename )
433
431
require .NoError (t , err )
434
432
err = json .Unmarshal (requestPayloadJSONBytes , & req )
435
433
require .NoError (t , err )
0 commit comments