Skip to content

Commit

Permalink
refactor: Rename mintime/maxtime, test: Update to use Equal
Browse files Browse the repository at this point in the history
  • Loading branch information
YazzyYaz committed Mar 15, 2018
1 parent 13fba81 commit 461593e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions build/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ type Thresholds struct {
}

type Timebounds struct {
Mintime uint64
Maxtime uint64
MinTime uint64
MaxTime uint64
}

// Trustor is a mutator capable of setting the trustor on
Expand Down
2 changes: 1 addition & 1 deletion build/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ func (m MemoText) MutateTransaction(o *TransactionBuilder) (err error) {
}

func (m Timebounds) MutateTransaction(o *TransactionBuilder) error {
o.TX.TimeBounds = &xdr.TimeBounds{MinTime: xdr.Uint64(m.Mintime), MaxTime: xdr.Uint64(m.Maxtime)}
o.TX.TimeBounds = &xdr.TimeBounds{MinTime: xdr.Uint64(m.MinTime), MaxTime: xdr.Uint64(m.MaxTime)}
return nil
}

Expand Down
4 changes: 2 additions & 2 deletions build/transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ var _ = Describe("Transaction Mutators:", func() {
BeforeEach(func() { mut = Timebounds{1521056118, 1521056298} })
It("succeeds", func() { Expect(err).NotTo(HaveOccurred()) })
It("sets an minimum and maximum timebound on the transaction", func() {
Expect(subject.TX.TimeBounds.MinTime).To(BeEquivalentTo(xdr.Uint64(1521056118)))
Expect(subject.TX.TimeBounds.MaxTime).To(BeEquivalentTo(xdr.Uint64(1521056298)))
Expect(subject.TX.TimeBounds.MinTime).To(Equal(xdr.Uint64(1521056118)))
Expect(subject.TX.TimeBounds.MaxTime).To(Equal(xdr.Uint64(1521056298)))
})
})

Expand Down

0 comments on commit 461593e

Please sign in to comment.