Skip to content

Commit

Permalink
switching to block height from block time
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMarstonConnell committed Aug 2, 2023
1 parent d4f306c commit 3493557
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
15 changes: 9 additions & 6 deletions scripts/test-attest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,52 +136,55 @@ sleep 60

echo "starting file uploads"

canined tx storage buy-storage jkl10k05lmc88q5ft3lm00q30qkd9x6654h3lejnct 720h 3000000000 ujkl --from charlie -y

sleep 10

curl -v -F sender=jkl10k05lmc88q5ft3lm00q30qkd9x6654h3lejnct -F file=@./scripts/dummy_data/1.png http://localhost:3330/upload

sleep 10

canined tx storage sign-contract jklc107a4hj35fg4jlcapl9h3y7rhw4p24pjtunv8hwwg2hp9dcwatgwsw229ql --from charlie -y --pay-upfront
canined tx storage sign-contract jklc107a4hj35fg4jlcapl9h3y7rhw4p24pjtunv8hwwg2hp9dcwatgwsw229ql --from charlie -y

sleep 30

curl -v -F sender=jkl10k05lmc88q5ft3lm00q30qkd9x6654h3lejnct -F file=@./scripts/dummy_data/3.png http://localhost:3331/upload

sleep 10

canined tx storage sign-contract jklc1mnjchx4g27929y5wfm6luvx86lhca688vqh3vtts6hjllfupgvdqgmr04k --from charlie -y --pay-upfront
canined tx storage sign-contract jklc1mnjchx4g27929y5wfm6luvx86lhca688vqh3vtts6hjllfupgvdqgmr04k --from charlie -y

sleep 30

curl -v -F sender=jkl10k05lmc88q5ft3lm00q30qkd9x6654h3lejnct -F file=@./scripts/dummy_data/4.png http://localhost:3332/upload

sleep 10

canined tx storage sign-contract jklc14y6hk074svd8dyjg5g6c2xzkcfv4ge0w2ey96plr98k4pyepk5xq46wjkn --from charlie -y --pay-upfront
canined tx storage sign-contract jklc14y6hk074svd8dyjg5g6c2xzkcfv4ge0w2ey96plr98k4pyepk5xq46wjkn --from charlie -y

sleep 30

curl -v -F sender=jkl10k05lmc88q5ft3lm00q30qkd9x6654h3lejnct -F file=@./scripts/dummy_data/test.txt http://localhost:3333/upload

sleep 10

canined tx storage sign-contract jklc102jpqmfj5w9pz555zfjd6e9v5nfcnjsy4vh08qhlmrnedrg5jvwqluwrl8 --from charlie -y --pay-upfront
canined tx storage sign-contract jklc102jpqmfj5w9pz555zfjd6e9v5nfcnjsy4vh08qhlmrnedrg5jvwqluwrl8 --from charlie -y

sleep 30

curl -v -F sender=jkl10k05lmc88q5ft3lm00q30qkd9x6654h3lejnct -F file=@./scripts/dummy_data/2.png http://localhost:3334/upload

sleep 10

canined tx storage sign-contract jklc16xdn85h9fel3ruawc3dxjdu7xtkdfp23j66fkkl7dc4277t03rds2rf7g7 --from charlie -y --pay-upfront
canined tx storage sign-contract jklc16xdn85h9fel3ruawc3dxjdu7xtkdfp23j66fkkl7dc4277t03rds2rf7g7 --from charlie -y

sleep 30

curl -v -F sender=jkl10k05lmc88q5ft3lm00q30qkd9x6654h3lejnct -F file=@./scripts/dummy_data/5.svg http://localhost:3335/upload

sleep 10

canined tx storage sign-contract jklc1g80djchxzjxztkff98wrelh86ha0alhwu0j9ce84sqvljy8vpddsg637q5 --from charlie -y --pay-upfront
canined tx storage sign-contract jklc1g80djchxzjxztkff98wrelh86ha0alhwu0j9ce84sqvljy8vpddsg637q5 --from charlie -y

sleep 30

Expand Down
2 changes: 1 addition & 1 deletion x/storage/keeper/msg_server_attest.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (k Keeper) RequestAttestation(ctx sdk.Context, cid string, creator string)
return nil, sdkerrors.Wrapf(types.ErrInvalidLengthQuery, "not enough providers online")
}

rand.Seed(ctx.BlockTime().UnixNano())
rand.Seed(ctx.BlockHeight())

attestations := make([]*types.Attestation, params.AttestFormSize)

Expand Down
2 changes: 1 addition & 1 deletion x/storage/keeper/msg_server_report.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (k Keeper) RequestReport(ctx sdk.Context, cid string) ([]string, error) {
return nil, sdkerrors.Wrapf(types.ErrInvalidLengthQuery, "not enough providers online")
}

rand.Seed(ctx.BlockTime().UnixNano())
rand.Seed(ctx.BlockHeight())

attestations := make([]*types.Attestation, params.AttestFormSize)

Expand Down

0 comments on commit 3493557

Please sign in to comment.