Skip to content

Commit

Permalink
Merge pull request #35 from mit-pdos/rename
Browse files Browse the repository at this point in the history
rename setup params
  • Loading branch information
sanjit-bhat authored Oct 18, 2024
2 parents eab0b2d + b296560 commit 33803c1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions kt/basictest.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ func setup(servAddr, adtr0Addr, adtr1Addr uint64) *setupParams {
return &setupParams{servAddr: servAddr, servSigPk: servSigPk, servVrfPk: servVrfPk, adtr0Addr: adtr0Addr, adtr0Pk: adtr0Pk, adtr1Addr: adtr1Addr, adtr1Pk: adtr1Pk}
}

func testBasic(params *setupParams) {
func testBasic(setup *setupParams) {
// alice put.
alice := newClient(aliceUid, params.servAddr, params.servSigPk, params.servVrfPk)
alice := newClient(aliceUid, setup.servAddr, setup.servSigPk, setup.servVrfPk)
pk0 := []byte{3}
ep0, err0 := alice.Put(pk0)
primitive.Assume(!err0.err)

// update auditors.
servCli := advrpc.Dial(params.servAddr)
adtr0Cli := advrpc.Dial(params.adtr0Addr)
adtr1Cli := advrpc.Dial(params.adtr1Addr)
servCli := advrpc.Dial(setup.servAddr)
adtr0Cli := advrpc.Dial(setup.adtr0Addr)
adtr1Cli := advrpc.Dial(setup.adtr1Addr)
upd0, err1 := callServAudit(servCli, 0)
primitive.Assume(!err1)
upd1, err2 := callServAudit(servCli, 1)
Expand All @@ -59,20 +59,20 @@ func testBasic(params *setupParams) {
primitive.Assume(!err6)

// bob get.
bob := newClient(bobUid, params.servAddr, params.servSigPk, params.servVrfPk)
bob := newClient(bobUid, setup.servAddr, setup.servSigPk, setup.servVrfPk)
isReg, pk1, ep1, err7 := bob.Get(aliceUid)
primitive.Assume(!err7.err)
// same epoch to avoid timeseries for basic TC.
primitive.Assume(ep0 == ep1)

// alice and bob audit.
err8 := alice.Audit(params.adtr0Addr, params.adtr0Pk)
err8 := alice.Audit(setup.adtr0Addr, setup.adtr0Pk)
primitive.Assume(!err8.err)
err9 := alice.Audit(params.adtr1Addr, params.adtr1Pk)
err9 := alice.Audit(setup.adtr1Addr, setup.adtr1Pk)
primitive.Assume(!err9.err)
err10 := bob.Audit(params.adtr0Addr, params.adtr0Pk)
err10 := bob.Audit(setup.adtr0Addr, setup.adtr0Pk)
primitive.Assume(!err10.err)
err11 := bob.Audit(params.adtr1Addr, params.adtr1Pk)
err11 := bob.Audit(setup.adtr1Addr, setup.adtr1Pk)
primitive.Assume(!err11.err)

// assert keys equal.
Expand Down

0 comments on commit 33803c1

Please sign in to comment.