diff --git a/utxonursery.go b/utxonursery.go index 5c712b48..3f8cc2f3 100644 --- a/utxonursery.go +++ b/utxonursery.go @@ -1722,38 +1722,6 @@ func readOutpoint(r io.Reader, o *wire.OutPoint) error { return nil } -func writeTxOut(w io.Writer, txo *wire.TxOut) error { - scratch := make([]byte, 8) - - byteOrder.PutUint64(scratch, uint64(txo.Value)) - if _, err := w.Write(scratch); err != nil { - return err - } - - if err := wire.WriteVarBytes(w, 0, txo.PkScript); err != nil { - return err - } - - return nil -} - -func readTxOut(r io.Reader, txo *wire.TxOut) error { - scratch := make([]byte, 8) - - if _, err := r.Read(scratch); err != nil { - return err - } - txo.Value = int64(byteOrder.Uint64(scratch)) - - pkScript, err := wire.ReadVarBytes(r, 0, 80, "pkScript") - if err != nil { - return err - } - txo.PkScript = pkScript - - return nil -} - // Compile-time constraint to ensure kidOutput implements the // Input interface. diff --git a/utxonursery_test.go b/utxonursery_test.go index a7249495..db0ebd9a 100644 --- a/utxonursery_test.go +++ b/utxonursery_test.go @@ -436,7 +436,7 @@ func createNurseryTestContext(t *testing.T, GenSweepScript: func() ([]byte, error) { return []byte{}, nil }, - Estimator: &mockFeeEstimator{}, + Estimator: &lnwallet.StaticFeeEstimator{}, Signer: &nurseryMockSigner{}, }) @@ -1011,21 +1011,6 @@ func (i *nurseryStoreInterceptor) RemoveChannel(chanPoint *wire.OutPoint) error return i.ns.RemoveChannel(chanPoint) } -type mockFeeEstimator struct{} - -func (m *mockFeeEstimator) EstimateFeePerKW( - numBlocks uint32) (lnwallet.SatPerKWeight, error) { - - return lnwallet.SatPerKWeight(10000), nil -} - -func (m *mockFeeEstimator) Start() error { - return nil -} -func (m *mockFeeEstimator) Stop() error { - return nil -} - type nurseryMockSigner struct { }