Merge pull request #2167 from joostjager/nursery-cleanup

utxonursery: clean up unused code
This commit is contained in:
Johan T. Halseth 2018-11-09 08:44:44 +01:00 committed by GitHub
commit 9c3be96490
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 48 deletions

@ -1722,38 +1722,6 @@ func readOutpoint(r io.Reader, o *wire.OutPoint) error {
return nil 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 // Compile-time constraint to ensure kidOutput implements the
// Input interface. // Input interface.

@ -436,7 +436,7 @@ func createNurseryTestContext(t *testing.T,
GenSweepScript: func() ([]byte, error) { GenSweepScript: func() ([]byte, error) {
return []byte{}, nil return []byte{}, nil
}, },
Estimator: &mockFeeEstimator{}, Estimator: &lnwallet.StaticFeeEstimator{},
Signer: &nurseryMockSigner{}, Signer: &nurseryMockSigner{},
}) })
@ -1011,21 +1011,6 @@ func (i *nurseryStoreInterceptor) RemoveChannel(chanPoint *wire.OutPoint) error
return i.ns.RemoveChannel(chanPoint) 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 { type nurseryMockSigner struct {
} }