mirror of
https://github.com/LBRYFoundation/lbcwallet.git
synced 2025-08-28 07:51:26 +00:00
Tests build again.
This commit is contained in:
parent
ea54b638f3
commit
be4c549682
1 changed files with 8 additions and 2 deletions
|
@ -9,6 +9,12 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
cfg = &config{
|
||||||
|
KeypoolSize: 100,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
type allowFreeTest struct {
|
type allowFreeTest struct {
|
||||||
name string
|
name string
|
||||||
inputs []*tx.Utxo
|
inputs []*tx.Utxo
|
||||||
|
@ -68,7 +74,7 @@ func TestAllowFree(t *testing.T) {
|
||||||
func TestFakeTxs(t *testing.T) {
|
func TestFakeTxs(t *testing.T) {
|
||||||
// First we need a wallet.
|
// First we need a wallet.
|
||||||
w, err := wallet.NewWallet("banana wallet", "", []byte("banana"),
|
w, err := wallet.NewWallet("banana wallet", "", []byte("banana"),
|
||||||
btcwire.MainNet, &wallet.BlockStamp{})
|
btcwire.MainNet, &wallet.BlockStamp{}, 100)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("Can not create encrypted wallet: %s", err)
|
t.Errorf("Can not create encrypted wallet: %s", err)
|
||||||
return
|
return
|
||||||
|
@ -84,7 +90,7 @@ func TestFakeTxs(t *testing.T) {
|
||||||
// This will pass validation because btcscript is unaware of invalid
|
// This will pass validation because btcscript is unaware of invalid
|
||||||
// tx inputs, however, this example would fail in btcd.
|
// tx inputs, however, this example would fail in btcd.
|
||||||
utxo := &tx.Utxo{}
|
utxo := &tx.Utxo{}
|
||||||
addr, err := w.NextChainedAddress(&wallet.BlockStamp{})
|
addr, err := w.NextChainedAddress(&wallet.BlockStamp{}, 100)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("Cannot get next address: %s", err)
|
t.Errorf("Cannot get next address: %s", err)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue