From 3c390364d7a4eed67e6999f2cd7d15a71cb3feec Mon Sep 17 00:00:00 2001 From: Josh Rickmar Date: Mon, 28 Oct 2013 09:15:26 -0400 Subject: [PATCH] Switch some integers from unsigned to signed. This change switches the time fields (firstSeen/lastSeen) of an address from uint64 to int64, to be compatible with (time.Time).Unix, as well as changing the block height fields (firstBlock/lastBlock) from uint32 to int32, since block height is normally represented signed. --- wallet/wallet.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wallet/wallet.go b/wallet/wallet.go index 1e756d9..ff0dbfd 100644 --- a/wallet/wallet.go +++ b/wallet/wallet.go @@ -807,10 +807,10 @@ type btcAddress struct { initVector [16]byte privKey [32]byte pubKey [65]byte - firstSeen uint64 - lastSeen uint64 - firstBlock uint32 - lastBlock uint32 + firstSeen int64 + lastSeen int64 + firstBlock int32 + lastBlock int32 privKeyCT []byte // non-nil if unlocked. } @@ -834,8 +834,8 @@ func newBtcAddress(privkey, iv []byte) (addr *btcAddress, err error) { hasPrivKey: true, hasPubKey: true, }, - firstSeen: math.MaxUint64, - firstBlock: math.MaxUint32, + firstSeen: math.MaxInt64, + firstBlock: math.MaxInt32, } copy(addr.initVector[:], iv) pub := pubkeyFromPrivkey(privkey)