mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-04-10 04:59:06 +02:00
lntemp+lntest: fix make lint
This commit is contained in:
parent
0d29f154db
commit
14f45d0722
@ -27,6 +27,14 @@ const (
|
||||
// defaultMinerFeeRate specifies the fee rate in sats when sending
|
||||
// outputs from the miner.
|
||||
defaultMinerFeeRate = 7500
|
||||
|
||||
// numBlocksSendOutput specifies the number of blocks to mine after
|
||||
// sending outputs from the miner.
|
||||
numBlocksSendOutput = 2
|
||||
|
||||
// numBlocksOpenChannel specifies the number of blocks mined when
|
||||
// opening a channel.
|
||||
numBlocksOpenChannel = 6
|
||||
)
|
||||
|
||||
// TestCase defines a test case that's been used in the integration test.
|
||||
@ -188,13 +196,13 @@ func (h *HarnessTest) SetupStandbyNodes() {
|
||||
PkScript: addrScript,
|
||||
Value: 10 * btcutil.SatoshiPerBitcoin,
|
||||
}
|
||||
h.Miner.SendOutput(output, 7500)
|
||||
h.Miner.SendOutput(output, defaultMinerFeeRate)
|
||||
}
|
||||
}
|
||||
|
||||
// We generate several blocks in order to give the outputs created
|
||||
// above a good number of confirmations.
|
||||
h.MineBlocks(2)
|
||||
h.MineBlocks(numBlocksSendOutput)
|
||||
|
||||
// Now we want to wait for the nodes to catch up.
|
||||
h.WaitForBlockchainSync(h.Alice)
|
||||
@ -280,6 +288,8 @@ func (h *HarnessTest) resetStandbyNodes(t *testing.T) {
|
||||
// which resets all the standby nodes' configs back to its original state and
|
||||
// create snapshots of each nodes' internal state.
|
||||
func (h *HarnessTest) Subtest(t *testing.T) *HarnessTest {
|
||||
t.Helper()
|
||||
|
||||
st := &HarnessTest{
|
||||
T: t,
|
||||
manager: h.manager,
|
||||
@ -440,6 +450,7 @@ func (h *HarnessTest) Shutdown(node *node.HarnessNode) {
|
||||
err := wait.NoError(func() error {
|
||||
return h.manager.shutdownNode(node)
|
||||
}, DefaultTimeout)
|
||||
|
||||
require.NoErrorf(h, err, "unable to shutdown %v", node.Name())
|
||||
}
|
||||
|
||||
@ -749,7 +760,7 @@ func (h *HarnessTest) OpenChannel(alice, bob *node.HarnessNode,
|
||||
// channel has been opened. The funding transaction should be found
|
||||
// within the first newly mined block. We mine 6 blocks so that in the
|
||||
// case that the channel is public, it is announced to the network.
|
||||
block := h.MineBlocksAndAssertNumTxes(6, 1)[0]
|
||||
block := h.MineBlocksAndAssertNumTxes(numBlocksOpenChannel, 1)[0]
|
||||
|
||||
// Wait for the channel open event.
|
||||
fundingChanPoint := h.WaitForChannelOpenEvent(chanOpenUpdate)
|
||||
|
@ -325,6 +325,7 @@ func (h *HarnessTest) ReceiveCloseChannelUpdate(
|
||||
case <-time.After(DefaultTimeout):
|
||||
require.Fail(h, "timeout", "timeout waiting for close channel "+
|
||||
"update sent")
|
||||
|
||||
return nil, nil
|
||||
|
||||
case err := <-errChan:
|
||||
|
@ -500,7 +500,7 @@ func (hn *HarnessNode) waitTillServerState(
|
||||
func (hn *HarnessNode) initLightningClient() error {
|
||||
// Wait until the server is fully started.
|
||||
if err := hn.WaitUntilServerActive(); err != nil {
|
||||
return fmt.Errorf("waiting for server active: %v", err)
|
||||
return fmt.Errorf("waiting for server active: %w", err)
|
||||
}
|
||||
|
||||
// Set the harness node's pubkey to what the node claims in GetInfo.
|
||||
|
@ -541,6 +541,8 @@ func parseDerivationPath(path string) ([]uint32, error) {
|
||||
// should be run in a goroutine and is used to test nodes with the zero-conf
|
||||
// feature bit.
|
||||
func acceptChannel(t *testing.T, zeroConf bool, stream rpc.AcceptorClient) {
|
||||
t.Helper()
|
||||
|
||||
req, err := stream.Recv()
|
||||
require.NoError(t, err)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user