Versions in this module Expand all Collapse all v1 v1.0.0 May 10, 2019 Changes in this version + const AsyncBenchmarkTimeout + const ChannelCloseTimeout + const ChannelOpenTimeout + const DefaultCSV + const DefaultTimeout + const MinerMempoolTimeout + func CopyFile(dest, src string) error + func WaitInvariant(statement func() bool, timeout time.Duration) error + func WaitNoError(f func() error, timeout time.Duration) error + func WaitPredicate(pred func() bool, timeout time.Duration) error + type BackendConfig interface + GenArgs func() []string + P2PAddr func() string + type BtcdBackendConfig struct + func NewBtcdBackend() (*BtcdBackendConfig, func(), error) + func (b BtcdBackendConfig) GenArgs() []string + func (b BtcdBackendConfig) P2PAddr() string + type HarnessNode struct + NodeID int + PubKey [33]byte + PubKeyStr string + func (hn *HarnessNode) AddToLog(line string) error + func (hn *HarnessNode) ChanBackupPath() string + func (hn *HarnessNode) ConnectRPC(useMacs bool) (*grpc.ClientConn, error) + func (hn *HarnessNode) DBPath() string + func (hn *HarnessNode) FetchNodeInfo() error + func (hn *HarnessNode) Init(ctx context.Context, initReq *lnrpc.InitWalletRequest) error + func (hn *HarnessNode) Name() string + func (hn *HarnessNode) SetExtraArgs(extraArgs []string) + func (hn *HarnessNode) Unlock(ctx context.Context, unlockReq *lnrpc.UnlockWalletRequest) error + func (hn *HarnessNode) WaitForBalance(expectedBalance btcutil.Amount, confirmed bool) error + func (hn *HarnessNode) WaitForBlockchainSync(ctx context.Context) error + func (hn *HarnessNode) WaitForNetworkChannelClose(ctx context.Context, op *lnrpc.ChannelPoint) error + func (hn *HarnessNode) WaitForNetworkChannelOpen(ctx context.Context, op *lnrpc.ChannelPoint) error + type NetworkHarness struct + Alice *HarnessNode + BackendCfg BackendConfig + Bob *HarnessNode + Miner *rpctest.Harness + func NewNetworkHarness(r *rpctest.Harness, b BackendConfig) (*NetworkHarness, error) + func (n *NetworkHarness) AssertChannelExists(ctx context.Context, node *HarnessNode, chanPoint *wire.OutPoint) error + func (n *NetworkHarness) CloseChannel(ctx context.Context, lnNode *HarnessNode, cp *lnrpc.ChannelPoint, force bool) (lnrpc.Lightning_CloseChannelClient, *chainhash.Hash, error) + func (n *NetworkHarness) ConnectNodes(ctx context.Context, a, b *HarnessNode) error + func (n *NetworkHarness) DisconnectNodes(ctx context.Context, a, b *HarnessNode) error + func (n *NetworkHarness) DumpLogs(node *HarnessNode) (string, error) + func (n *NetworkHarness) EnsureConnected(ctx context.Context, a, b *HarnessNode) error + func (n *NetworkHarness) LookUpNodeByPub(pubStr string) (*HarnessNode, error) + func (n *NetworkHarness) NewNode(name string, extraArgs []string) (*HarnessNode, error) + func (n *NetworkHarness) NewNodeWithSeed(name string, extraArgs []string, password []byte) (*HarnessNode, []string, error) + func (n *NetworkHarness) OnTxAccepted(hash *chainhash.Hash) + func (n *NetworkHarness) OpenChannel(ctx context.Context, srcNode, destNode *HarnessNode, p OpenChannelParams) (lnrpc.Lightning_OpenChannelClient, error) + func (n *NetworkHarness) OpenPendingChannel(ctx context.Context, srcNode, destNode *HarnessNode, amt btcutil.Amount, ...) (*lnrpc.PendingUpdate, error) + func (n *NetworkHarness) ProcessErrors() <-chan error + func (n *NetworkHarness) RegisterNode(node *HarnessNode) + func (n *NetworkHarness) RestartNode(node *HarnessNode, callback func() error, ...) error + func (n *NetworkHarness) RestoreNodeWithSeed(name string, extraArgs []string, password []byte, mnemonic []string, ...) (*HarnessNode, error) + func (n *NetworkHarness) SendCoins(ctx context.Context, amt btcutil.Amount, target *HarnessNode) error + func (n *NetworkHarness) SendCoinsNP2WKH(ctx context.Context, amt btcutil.Amount, target *HarnessNode) error + func (n *NetworkHarness) SendCoinsUnconfirmed(ctx context.Context, amt btcutil.Amount, target *HarnessNode) error + func (n *NetworkHarness) SetUp(lndArgs []string) error + func (n *NetworkHarness) ShutdownNode(node *HarnessNode) error + func (n *NetworkHarness) StopNode(node *HarnessNode) error + func (n *NetworkHarness) SuspendNode(node *HarnessNode) (func() error, error) + func (n *NetworkHarness) TearDownAll() error + func (n *NetworkHarness) WaitForChannelClose(ctx context.Context, closeChanStream lnrpc.Lightning_CloseChannelClient) (*chainhash.Hash, error) + func (n *NetworkHarness) WaitForChannelOpen(ctx context.Context, openChanStream lnrpc.Lightning_OpenChannelClient) (*lnrpc.ChannelPoint, error) + func (n *NetworkHarness) WaitForTxBroadcast(ctx context.Context, txid chainhash.Hash) error + type OpenChannelParams struct + Amt btcutil.Amount + MinHtlc lnwire.MilliSatoshi + Private bool + PushAmt btcutil.Amount + SpendUnconfirmed bool