diff --git a/funding/manager.go b/funding/manager.go index adc0f99..881d31a 100644 --- a/funding/manager.go +++ b/funding/manager.go @@ -26,17 +26,6 @@ import ( "google.golang.org/grpc/status" ) -var ( - // DefaultBatchStepTimeout is the default time we allow an action that - // blocks the batch conversation (like peer connection establishment or - // channel open) to take. If any action takes longer, we might reject - // the order from that slow peer. This value SHOULD be lower than the - // defaultMsgTimeout on the server side otherwise nodes might get kicked - // out of the match making process for timing out even though it was - // their peer's fault. - DefaultBatchStepTimeout = 15 * time.Second -) - // MatchRejectErr is an error type that is returned from the funding manager if // the trader rejects certain orders instead of the whole batch. type MatchRejectErr struct { diff --git a/order/batch.go b/order/batch.go index 7567bbb..265b39e 100644 --- a/order/batch.go +++ b/order/batch.go @@ -5,6 +5,7 @@ import ( "context" "fmt" "net" + "time" "github.com/btcsuite/btcd/btcec" "github.com/btcsuite/btcd/wire" @@ -27,6 +28,17 @@ const ( MaxBatchIDHistoryLookup = 10_000 ) +var ( + // DefaultBatchStepTimeout is the default time we allow an action that + // blocks the batch conversation (like peer connection establishment or + // channel open) to take. If any action takes longer, we might reject + // the order from that slow peer. This value SHOULD be lower than the + // defaultMsgTimeout on the server side otherwise nodes might get kicked + // out of the match making process for timing out even though it was + // their peer's fault. + DefaultBatchStepTimeout = 15 * time.Second +) + // BatchVersion is the type for the batch verification protocol. type BatchVersion uint32 diff --git a/server.go b/server.go index 3a4f381..7b6ec90 100644 --- a/server.go +++ b/server.go @@ -462,7 +462,7 @@ func (s *Server) setupClient() error { WalletKit: s.lndServices.WalletKit, LightningClient: s.lndServices.Client, BaseClient: s.lndClient, - BatchStepTimeout: funding.DefaultBatchStepTimeout, + BatchStepTimeout: order.DefaultBatchStepTimeout, NewNodesOnly: s.cfg.NewNodesOnly, PendingOpenChannels: make( chan *lnrpc.ChannelEventUpdate_PendingOpenChannel,