waddrmgr: update test to ensure timestamp is set

This commit is contained in:
Olaoluwa Osuntokun 2018-03-05 12:44:41 -05:00
parent 27dfed7f27
commit d0d94666cf

View file

@ -11,6 +11,7 @@ import (
"os" "os"
"reflect" "reflect"
"testing" "testing"
"time"
"github.com/roasbeef/btcd/chaincfg" "github.com/roasbeef/btcd/chaincfg"
"github.com/roasbeef/btcd/chaincfg/chainhash" "github.com/roasbeef/btcd/chaincfg/chainhash"
@ -1701,6 +1702,7 @@ func testSync(tc *testContext) bool {
blockStamp = waddrmgr.BlockStamp{ blockStamp = waddrmgr.BlockStamp{
Height: 1, Height: 1,
Hash: *latestHash, Hash: *latestHash,
Timestamp: time.Unix(1234, 0),
} }
err = walletdb.Update(tc.db, func(tx walletdb.ReadWriteTx) error { err = walletdb.Update(tc.db, func(tx walletdb.ReadWriteTx) error {
ns := tx.ReadWriteBucket(waddrmgrNamespaceKey) ns := tx.ReadWriteBucket(waddrmgrNamespaceKey)