diff --git a/btcjson/v2/btcjson/chainsvrwscmds.go b/btcjson/v2/btcjson/chainsvrwscmds.go index aae31d38a..7409d0d16 100644 --- a/btcjson/v2/btcjson/chainsvrwscmds.go +++ b/btcjson/v2/btcjson/chainsvrwscmds.go @@ -7,10 +7,6 @@ package btcjson -import ( - "github.com/btcsuite/btcd/wire" -) - // AuthenticateCmd defines the authenticate JSON-RPC command. type AuthenticateCmd struct { Username string @@ -71,15 +67,6 @@ type OutPoint struct { Index uint32 `json:"index"` } -// NewOutPointFromWire creates a new OutPoint from the OutPoint structure -// of the btcwire package. -func NewOutPointFromWire(op *wire.OutPoint) *OutPoint { - return &OutPoint{ - Hash: op.Hash.String(), - Index: op.Index, - } -} - // NotifySpentCmd defines the notifyspent JSON-RPC command. type NotifySpentCmd struct { OutPoints []OutPoint diff --git a/btcjson/v2/btcjson/chainsvrwscmds_test.go b/btcjson/v2/btcjson/chainsvrwscmds_test.go index 6f9c18e31..32f7bfa18 100644 --- a/btcjson/v2/btcjson/chainsvrwscmds_test.go +++ b/btcjson/v2/btcjson/chainsvrwscmds_test.go @@ -12,7 +12,6 @@ import ( "testing" "github.com/btcsuite/btcd/btcjson/v2/btcjson" - "github.com/btcsuite/btcd/wire" ) // TestChainSvrWsCmds tests all of the chain server websocket-specific commands @@ -112,9 +111,10 @@ func TestChainSvrWsCmds(t *testing.T) { }, staticCmd: func() interface{} { addrs := []string{"1Address"} - hash, _ := wire.NewShaHashFromStr("123") - op := wire.NewOutPoint(hash, 0) - ops := []btcjson.OutPoint{*btcjson.NewOutPointFromWire(op)} + ops := []btcjson.OutPoint{{ + Hash: "0000000000000000000000000000000000000000000000000000000000000123", + Index: 0, + }} return btcjson.NewRescanCmd("123", addrs, ops, nil) }, marshalled: `{"jsonrpc":"1.0","method":"rescan","params":["123",["1Address"],[{"hash":"0000000000000000000000000000000000000000000000000000000000000123","index":0}]],"id":1}`,