Skip to content

Commit

Permalink
Merge pull request #23 from mysteriumnetwork/int-to-uint
Browse files Browse the repository at this point in the history
int64 -> uint64 for promise seqNo and amount
  • Loading branch information
tadovas authored Feb 13, 2019
2 parents f6c7aea + 5680cc0 commit 14920d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions promises/clearing.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ func (pc *PromiseClearing) ClearReceivedPromise(promise *ReceivedPromise) error
_, err = pc.ClearPromise(
packedAddressAndSigns,
extraDataHash,
big.NewInt(promise.SeqNo),
big.NewInt(promise.Amount),
big.NewInt(0).SetUint64(promise.SeqNo),
big.NewInt(0).SetUint64(promise.Amount),
issuerSig.R,
issuerSig.S,
receiverSig.R,
Expand Down
8 changes: 4 additions & 4 deletions promises/promise.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ var _ ExtraData = EmptyExtra{}
type Promise struct {
Extra ExtraData
Receiver common.Address
SeqNo int64
Amount int64
SeqNo uint64
Amount uint64
}

const issuerPrefix = "Issuer prefix:"
Expand All @@ -37,8 +37,8 @@ func (p *Promise) Bytes() []byte {
slices := [][]byte{
p.Extra.Hash(),
p.Receiver.Bytes(),
abi.U256(big.NewInt(p.SeqNo)),
abi.U256(big.NewInt(p.Amount)),
abi.U256(big.NewInt(0).SetUint64(p.SeqNo)),
abi.U256(big.NewInt(0).SetUint64(p.Amount)),
}
var res []byte
for _, slice := range slices {
Expand Down

0 comments on commit 14920d2

Please sign in to comment.