func NewSidecarAcceptor(cfg *SidecarAcceptorConfig) *SidecarAcceptor {
	cfg.ClientCfg.ConnectSidecar = true
	return &SidecarAcceptor{
		cfg:                  cfg,
		pendingSidecarOrders: make(map[order.Nonce]*sidecar.Ticket),
		quit:                 make(chan struct{}),
		negotiators:          make(map[[64]byte]*SidecarNegotiator),
	}
}
NewSidecarAcceptor creates a new sidecar acceptor.
package pool
import (
	"bytes"
	"context"
	"fmt"
	"sync"
	"github.com/btcsuite/btcd/btcec"
	"github.com/davecgh/go-spew/spew"
	"github.com/lightninglabs/lndclient"
	"github.com/lightninglabs/pool/account"
	"github.com/lightninglabs/pool/auctioneer"
	"github.com/lightninglabs/pool/auctioneerrpc"
	"github.com/lightninglabs/pool/clientdb"
	"github.com/lightninglabs/pool/funding"
	"github.com/lightninglabs/pool/order"
	"github.com/lightninglabs/pool/sidecar"
	"github.com/lightningnetwork/lnd/keychain"
	"github.com/lightningnetwork/lnd/subscribe"
	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/status"
)
type SidecarAcceptor struct {
	cfg *SidecarAcceptorConfig
	client                *auctioneer.Client
	pendingOpenChanClient *subscribe.Client
	pendingSidecarOrders    map[order.Nonce]*sidecar.Ticket
	pendingSidecarOrdersMtx sync.Mutex
	pendingBatch            *order.Batch
	sync.Mutex
	negotiators map[[64]byte]*SidecarNegotiator
	quit chan struct{}
	wg   sync.WaitGroup
}
type SidecarAcceptorConfig struct {
	SidecarDB sidecar.Store
	AcctDB account.Store
	Signer lndclient.SignerClient
	Wallet lndclient.WalletKitClient
	BaseClient funding.BaseClient
	Acceptor *ChannelAcceptor
	NodePubKey *btcec.PublicKey
	ClientCfg auctioneer.Config
	PrepareOrder orderPreparer
	FundingManager *funding.Manager
	FetchSidecarBid func(*sidecar.Ticket) (*order.Bid, error)
}