mirror of
https://github.com/lightninglabs/pool.git
synced 2026-08-13 12:33:04 +02:00
multi: update to lnd v0.17.0-beta
This commit is contained in:
parent
70dd1b107e
commit
31f714dafc
15 changed files with 1333 additions and 522 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc-gen-go v1.30.0
|
||||
// protoc v3.6.1
|
||||
// source: auctioneer.proto
|
||||
|
||||
|
|
@ -2418,11 +2418,11 @@ type OrderMatchPrepare struct {
|
|||
|
||||
// Deprecated, use matched_markets.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in auctioneer.proto.
|
||||
MatchedOrders map[string]*MatchedOrder `protobuf:"bytes,1,rep,name=matched_orders,json=matchedOrders,proto3" json:"matched_orders,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
// Deprecated, use matched_markets.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in auctioneer.proto.
|
||||
ClearingPriceRate uint32 `protobuf:"varint,2,opt,name=clearing_price_rate,json=clearingPriceRate,proto3" json:"clearing_price_rate,omitempty"`
|
||||
// A list of the user's own accounts that are being spent by the matched
|
||||
// orders. The list contains the differences that would be applied by the
|
||||
|
|
@ -2486,7 +2486,7 @@ func (*OrderMatchPrepare) Descriptor() ([]byte, []int) {
|
|||
return file_auctioneer_proto_rawDescGZIP(), []int{21}
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in auctioneer.proto.
|
||||
func (x *OrderMatchPrepare) GetMatchedOrders() map[string]*MatchedOrder {
|
||||
if x != nil {
|
||||
return x.MatchedOrders
|
||||
|
|
@ -2494,7 +2494,7 @@ func (x *OrderMatchPrepare) GetMatchedOrders() map[string]*MatchedOrder {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in auctioneer.proto.
|
||||
func (x *OrderMatchPrepare) GetClearingPriceRate() uint32 {
|
||||
if x != nil {
|
||||
return x.ClearingPriceRate
|
||||
|
|
@ -4174,13 +4174,13 @@ type TermsResponse struct {
|
|||
MaxAccountValue uint64 `protobuf:"varint,1,opt,name=max_account_value,json=maxAccountValue,proto3" json:"max_account_value,omitempty"`
|
||||
// Deprecated, use explicit order duration from lease_duration_buckets.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in auctioneer.proto.
|
||||
MaxOrderDurationBlocks uint32 `protobuf:"varint,2,opt,name=max_order_duration_blocks,json=maxOrderDurationBlocks,proto3" json:"max_order_duration_blocks,omitempty"`
|
||||
// The execution fee charged per matched order.
|
||||
ExecutionFee *ExecutionFee `protobuf:"bytes,3,opt,name=execution_fee,json=executionFee,proto3" json:"execution_fee,omitempty"`
|
||||
// Deprecated, use lease_duration_buckets.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in auctioneer.proto.
|
||||
LeaseDurations map[uint32]bool `protobuf:"bytes,4,rep,name=lease_durations,json=leaseDurations,proto3" json:"lease_durations,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
|
||||
// The confirmation target to use for fee estimation of the next batch.
|
||||
NextBatchConfTarget uint32 `protobuf:"varint,5,opt,name=next_batch_conf_target,json=nextBatchConfTarget,proto3" json:"next_batch_conf_target,omitempty"`
|
||||
|
|
@ -4237,7 +4237,7 @@ func (x *TermsResponse) GetMaxAccountValue() uint64 {
|
|||
return 0
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in auctioneer.proto.
|
||||
func (x *TermsResponse) GetMaxOrderDurationBlocks() uint32 {
|
||||
if x != nil {
|
||||
return x.MaxOrderDurationBlocks
|
||||
|
|
@ -4252,7 +4252,7 @@ func (x *TermsResponse) GetExecutionFee() *ExecutionFee {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in auctioneer.proto.
|
||||
func (x *TermsResponse) GetLeaseDurations() map[uint32]bool {
|
||||
if x != nil {
|
||||
return x.LeaseDurations
|
||||
|
|
@ -4367,11 +4367,11 @@ type RelevantBatch struct {
|
|||
ChargedAccounts []*AccountDiff `protobuf:"bytes,3,rep,name=charged_accounts,json=chargedAccounts,proto3" json:"charged_accounts,omitempty"`
|
||||
// Deprecated, use matched_markets.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in auctioneer.proto.
|
||||
MatchedOrders map[string]*MatchedOrder `protobuf:"bytes,4,rep,name=matched_orders,json=matchedOrders,proto3" json:"matched_orders,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
// Deprecated, use matched_markets.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in auctioneer.proto.
|
||||
ClearingPriceRate uint32 `protobuf:"varint,5,opt,name=clearing_price_rate,json=clearingPriceRate,proto3" json:"clearing_price_rate,omitempty"`
|
||||
// The fee parameters used to calculate the execution fees.
|
||||
ExecutionFee *ExecutionFee `protobuf:"bytes,6,opt,name=execution_fee,json=executionFee,proto3" json:"execution_fee,omitempty"`
|
||||
|
|
@ -4440,7 +4440,7 @@ func (x *RelevantBatch) GetChargedAccounts() []*AccountDiff {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in auctioneer.proto.
|
||||
func (x *RelevantBatch) GetMatchedOrders() map[string]*MatchedOrder {
|
||||
if x != nil {
|
||||
return x.MatchedOrders
|
||||
|
|
@ -4448,7 +4448,7 @@ func (x *RelevantBatch) GetMatchedOrders() map[string]*MatchedOrder {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in auctioneer.proto.
|
||||
func (x *RelevantBatch) GetClearingPriceRate() uint32 {
|
||||
if x != nil {
|
||||
return x.ClearingPriceRate
|
||||
|
|
@ -5013,11 +5013,11 @@ type BatchSnapshotResponse struct {
|
|||
PrevBatchId []byte `protobuf:"bytes,3,opt,name=prev_batch_id,json=prevBatchId,proto3" json:"prev_batch_id,omitempty"`
|
||||
// Deprecated, use matched_markets.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in auctioneer.proto.
|
||||
ClearingPriceRate uint32 `protobuf:"varint,4,opt,name=clearing_price_rate,json=clearingPriceRate,proto3" json:"clearing_price_rate,omitempty"`
|
||||
// Deprecated, use matched_markets.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in auctioneer.proto.
|
||||
MatchedOrders []*MatchedOrderSnapshot `protobuf:"bytes,5,rep,name=matched_orders,json=matchedOrders,proto3" json:"matched_orders,omitempty"`
|
||||
// The txid of the batch transaction.
|
||||
BatchTxId string `protobuf:"bytes,7,opt,name=batch_tx_id,json=batchTxId,proto3" json:"batch_tx_id,omitempty"`
|
||||
|
|
@ -5085,7 +5085,7 @@ func (x *BatchSnapshotResponse) GetPrevBatchId() []byte {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in auctioneer.proto.
|
||||
func (x *BatchSnapshotResponse) GetClearingPriceRate() uint32 {
|
||||
if x != nil {
|
||||
return x.ClearingPriceRate
|
||||
|
|
@ -5093,7 +5093,7 @@ func (x *BatchSnapshotResponse) GetClearingPriceRate() uint32 {
|
|||
return 0
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in auctioneer.proto.
|
||||
func (x *BatchSnapshotResponse) GetMatchedOrders() []*MatchedOrderSnapshot {
|
||||
if x != nil {
|
||||
return x.MatchedOrders
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc-gen-go v1.30.0
|
||||
// protoc v3.6.1
|
||||
// source: hashmail.proto
|
||||
|
||||
|
|
|
|||
|
|
@ -70,14 +70,12 @@ func deriveProviderStreamID(ticket *sidecar.Ticket) ([64]byte, error) {
|
|||
|
||||
// This stream ID will simply be the fixed 64-byte signature of our
|
||||
// sidecar ticket offer.
|
||||
wireSig, err := lnwire.NewSigFromRawSignature(
|
||||
ticket.Offer.SigOfferDigest.Serialize(),
|
||||
)
|
||||
wireSig, err := lnwire.NewSigFromSignature(ticket.Offer.SigOfferDigest)
|
||||
if err != nil {
|
||||
return streamID, err
|
||||
}
|
||||
|
||||
copy(streamID[:], wireSig[:])
|
||||
copy(streamID[:], wireSig.RawBytes())
|
||||
|
||||
return streamID, nil
|
||||
}
|
||||
|
|
@ -92,14 +90,12 @@ func deriveRecipientStreamID(ticket *sidecar.Ticket) ([64]byte, error) {
|
|||
//
|
||||
// To enable this, we'll use the sha256 of the offer sig as this is
|
||||
// static for the lifetime of the entire ticket.
|
||||
wireSig, err := lnwire.NewSigFromRawSignature(
|
||||
ticket.Offer.SigOfferDigest.Serialize(),
|
||||
)
|
||||
wireSig, err := lnwire.NewSigFromSignature(ticket.Offer.SigOfferDigest)
|
||||
if err != nil {
|
||||
return [64]byte{}, err
|
||||
}
|
||||
|
||||
streamID := sha512.Sum512(wireSig[:])
|
||||
streamID := sha512.Sum512(wireSig.RawBytes())
|
||||
|
||||
return streamID, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import (
|
|||
"bytes"
|
||||
"context"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
|
|
@ -16,14 +17,13 @@ import (
|
|||
"github.com/lightninglabs/lndclient"
|
||||
"github.com/lightninglabs/pool"
|
||||
"github.com/lightninglabs/pool/poolrpc"
|
||||
"github.com/lightninglabs/protobuf-hex-display/json"
|
||||
"github.com/lightninglabs/protobuf-hex-display/jsonpb"
|
||||
"github.com/lightninglabs/protobuf-hex-display/proto"
|
||||
"github.com/lightningnetwork/lnd/lncfg"
|
||||
"github.com/lightningnetwork/lnd/lnrpc"
|
||||
"github.com/lightningnetwork/lnd/macaroons"
|
||||
"github.com/urfave/cli"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials"
|
||||
"google.golang.org/protobuf/proto"
|
||||
"gopkg.in/macaroon.v2"
|
||||
)
|
||||
|
||||
|
|
@ -89,19 +89,13 @@ func printJSON(resp interface{}) {
|
|||
}
|
||||
|
||||
func printRespJSON(resp proto.Message) { // nolint
|
||||
jsonMarshaler := &jsonpb.Marshaler{
|
||||
EmitDefaults: true,
|
||||
OrigName: true,
|
||||
Indent: "\t", // Matches indentation of printJSON.
|
||||
}
|
||||
|
||||
jsonStr, err := jsonMarshaler.MarshalToString(resp)
|
||||
jsonBytes, err := lnrpc.ProtoJSONMarshalOpts.Marshal(resp)
|
||||
if err != nil {
|
||||
fmt.Println("unable to decode response: ", err)
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println(jsonStr)
|
||||
fmt.Println(string(jsonBytes))
|
||||
}
|
||||
|
||||
func fatal(err error) {
|
||||
|
|
|
|||
105
go.mod
105
go.mod
|
|
@ -1,38 +1,35 @@
|
|||
module github.com/lightninglabs/pool
|
||||
|
||||
go 1.18
|
||||
|
||||
require (
|
||||
github.com/btcsuite/btcd v0.23.5-0.20230125025938-be056b0a0b2f
|
||||
github.com/btcsuite/btcd v0.23.5-0.20230905170901-80f5a0ffdf36
|
||||
github.com/btcsuite/btcd/btcec/v2 v2.3.2
|
||||
github.com/btcsuite/btcd/btcutil v1.1.3
|
||||
github.com/btcsuite/btcd/btcutil/psbt v1.1.5
|
||||
github.com/btcsuite/btcd/btcutil v1.1.4-0.20230904040416-d4f519f5dc05
|
||||
github.com/btcsuite/btcd/btcutil/psbt v1.1.8
|
||||
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2
|
||||
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
|
||||
github.com/btcsuite/btcwallet v0.16.7
|
||||
github.com/btcsuite/btcwallet v0.16.10-0.20230804184612-07be54bc22cf
|
||||
github.com/btcsuite/btcwallet/wallet/txrules v1.2.0
|
||||
github.com/btcsuite/btcwallet/wtxmgr v1.5.0
|
||||
github.com/davecgh/go-spew v1.1.1
|
||||
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1
|
||||
github.com/golang/mock v1.6.0
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.5.0
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3
|
||||
github.com/jessevdk/go-flags v1.4.0
|
||||
github.com/lightninglabs/aperture v0.1.20-beta
|
||||
github.com/lightninglabs/lndclient v0.16.0-10
|
||||
github.com/lightninglabs/pool/auctioneerrpc v1.0.7
|
||||
github.com/lightninglabs/protobuf-hex-display v1.4.3-hex-display
|
||||
github.com/lightningnetwork/lnd v0.16.0-beta
|
||||
github.com/lightningnetwork/lnd/cert v1.2.1
|
||||
github.com/lightningnetwork/lnd/kvdb v1.4.1
|
||||
github.com/lightningnetwork/lnd/tlv v1.1.0
|
||||
github.com/lightningnetwork/lnd/tor v1.1.0
|
||||
github.com/stretchr/testify v1.8.1
|
||||
github.com/lightninglabs/aperture v0.1.21-beta.0.20230705004936-87bb996a4030
|
||||
github.com/lightninglabs/lndclient v0.17.0-1
|
||||
github.com/lightninglabs/pool/auctioneerrpc v1.1.1
|
||||
github.com/lightningnetwork/lnd v0.17.0-beta
|
||||
github.com/lightningnetwork/lnd/cert v1.2.2
|
||||
github.com/lightningnetwork/lnd/kvdb v1.4.4
|
||||
github.com/lightningnetwork/lnd/tlv v1.1.1
|
||||
github.com/lightningnetwork/lnd/tor v1.1.2
|
||||
github.com/stretchr/testify v1.8.2
|
||||
github.com/urfave/cli v1.22.9
|
||||
go.etcd.io/bbolt v1.3.6
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
|
||||
go.etcd.io/bbolt v1.3.7
|
||||
golang.org/x/sync v0.2.0
|
||||
google.golang.org/grpc v1.53.0
|
||||
google.golang.org/protobuf v1.28.1
|
||||
gopkg.in/macaroon-bakery.v2 v2.0.1
|
||||
google.golang.org/protobuf v1.30.0
|
||||
gopkg.in/macaroon-bakery.v2 v2.1.0
|
||||
gopkg.in/macaroon.v2 v2.1.0
|
||||
)
|
||||
|
||||
|
|
@ -50,8 +47,8 @@ require (
|
|||
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd // indirect
|
||||
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792 // indirect
|
||||
github.com/btcsuite/winsvc v1.0.0 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.1.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.1.1 // indirect
|
||||
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/coreos/go-semver v0.3.0 // indirect
|
||||
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f // indirect
|
||||
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
|
||||
|
|
@ -73,13 +70,14 @@ require (
|
|||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
|
||||
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
|
||||
github.com/jackc/pgconn v1.10.0 // indirect
|
||||
github.com/jackc/pgconn v1.14.0 // indirect
|
||||
github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa // indirect
|
||||
github.com/jackc/pgio v1.0.0 // indirect
|
||||
github.com/jackc/pgpassfile v1.0.0 // indirect
|
||||
github.com/jackc/pgproto3/v2 v2.1.1 // indirect
|
||||
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
|
||||
github.com/jackc/pgtype v1.8.1 // indirect
|
||||
github.com/jackc/pgx/v4 v4.13.0 // indirect
|
||||
github.com/jackc/pgproto3/v2 v2.3.2 // indirect
|
||||
github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
|
||||
github.com/jackc/pgtype v1.14.0 // indirect
|
||||
github.com/jackc/pgx/v4 v4.18.1 // indirect
|
||||
github.com/jackpal/gateway v1.0.5 // indirect
|
||||
github.com/jackpal/go-nat-pmp v0.0.0-20170405195558-28a68d0c24ad // indirect
|
||||
github.com/jonboulle/clockwork v0.2.2 // indirect
|
||||
|
|
@ -90,17 +88,17 @@ require (
|
|||
github.com/kkdai/bstream v1.0.0 // indirect
|
||||
github.com/klauspost/compress v1.13.6 // indirect
|
||||
github.com/klauspost/pgzip v1.2.5 // indirect
|
||||
github.com/lib/pq v1.10.3 // indirect
|
||||
github.com/lib/pq v1.10.7 // indirect
|
||||
github.com/lightninglabs/gozmq v0.0.0-20191113021534-d20a764486bf // indirect
|
||||
github.com/lightninglabs/neutrino v0.15.0 // indirect
|
||||
github.com/lightninglabs/neutrino v0.16.0 // indirect
|
||||
github.com/lightninglabs/neutrino/cache v1.1.1 // indirect
|
||||
github.com/lightningnetwork/lightning-onion v1.2.1-0.20221202012345-ca23184850a1 // indirect
|
||||
github.com/lightningnetwork/lnd/clock v1.1.0 // indirect
|
||||
github.com/lightningnetwork/lnd/healthcheck v1.2.2 // indirect
|
||||
github.com/lightningnetwork/lnd/queue v1.1.0 // indirect
|
||||
github.com/lightningnetwork/lnd/ticker v1.1.0 // indirect
|
||||
github.com/lightningnetwork/lightning-onion v1.2.1-0.20230823005744-06182b1d7d2f // indirect
|
||||
github.com/lightningnetwork/lnd/clock v1.1.1 // indirect
|
||||
github.com/lightningnetwork/lnd/healthcheck v1.2.3 // indirect
|
||||
github.com/lightningnetwork/lnd/queue v1.1.1 // indirect
|
||||
github.com/lightningnetwork/lnd/ticker v1.1.1 // indirect
|
||||
github.com/ltcsuite/ltcd v0.0.0-20190101042124-f37f8bf35796 // indirect
|
||||
github.com/mattn/go-isatty v0.0.16 // indirect
|
||||
github.com/mattn/go-isatty v0.0.17 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
|
||||
github.com/mholt/archiver/v3 v3.5.0 // indirect
|
||||
github.com/miekg/dns v1.1.43 // indirect
|
||||
|
|
@ -117,14 +115,14 @@ require (
|
|||
github.com/rogpeppe/fastuuid v1.2.0 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.0.1 // indirect
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
|
||||
github.com/sirupsen/logrus v1.7.0 // indirect
|
||||
github.com/sirupsen/logrus v1.9.2 // indirect
|
||||
github.com/soheilhy/cmux v0.1.5 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/stretchr/objx v0.5.0 // indirect
|
||||
github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect
|
||||
github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect
|
||||
github.com/tv42/zbase32 v0.0.0-20160707012821-501572607d02 // indirect
|
||||
github.com/ulikunitz/xz v0.5.10 // indirect
|
||||
github.com/ulikunitz/xz v0.5.11 // indirect
|
||||
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
|
||||
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
|
||||
gitlab.com/yawning/bsaes.git v0.0.0-20190805113838-0a714cd429ec // indirect
|
||||
|
|
@ -141,20 +139,20 @@ require (
|
|||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.0.1 // indirect
|
||||
go.opentelemetry.io/otel/sdk v1.0.1 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.0.1 // indirect
|
||||
go.opentelemetry.io/proto/otlp v0.9.0 // indirect
|
||||
go.opentelemetry.io/proto/otlp v0.15.0 // indirect
|
||||
go.uber.org/atomic v1.7.0 // indirect
|
||||
go.uber.org/multierr v1.6.0 // indirect
|
||||
go.uber.org/zap v1.17.0 // indirect
|
||||
golang.org/x/crypto v0.1.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20221111094246-ab4555d3164f // indirect
|
||||
golang.org/x/mod v0.6.0 // indirect
|
||||
golang.org/x/net v0.7.0 // indirect
|
||||
golang.org/x/sys v0.5.0 // indirect
|
||||
golang.org/x/term v0.5.0 // indirect
|
||||
golang.org/x/text v0.7.0 // indirect
|
||||
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba // indirect
|
||||
golang.org/x/tools v0.2.0 // indirect
|
||||
google.golang.org/genproto v0.0.0-20210617175327-b9e0b3197ced // indirect
|
||||
golang.org/x/crypto v0.7.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0 // indirect
|
||||
golang.org/x/mod v0.10.0 // indirect
|
||||
golang.org/x/net v0.10.0 // indirect
|
||||
golang.org/x/sys v0.8.0 // indirect
|
||||
golang.org/x/term v0.8.0 // indirect
|
||||
golang.org/x/text v0.9.0 // indirect
|
||||
golang.org/x/time v0.1.0 // indirect
|
||||
golang.org/x/tools v0.9.1 // indirect
|
||||
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
|
||||
gopkg.in/errgo.v1 v1.0.1 // indirect
|
||||
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
|
|
@ -172,9 +170,10 @@ require (
|
|||
sigs.k8s.io/yaml v1.2.0 // indirect
|
||||
)
|
||||
|
||||
// We need to use grpc v1.39.0 because of a change in how HTTP errors are
|
||||
// formatted and sent to the client. This change was introduced in grpc v1.40.0
|
||||
// with https://github.com/grpc/grpc-go/pull/4474.
|
||||
replace google.golang.org/grpc => google.golang.org/grpc v1.39.0
|
||||
// We want to format raw bytes as hex instead of base64. The forked version
|
||||
// allows us to specify that as an option.
|
||||
replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-display v1.30.0-hex-display
|
||||
|
||||
replace github.com/lightninglabs/pool/auctioneerrpc => ./auctioneerrpc
|
||||
|
||||
go 1.19
|
||||
|
|
|
|||
|
|
@ -388,6 +388,21 @@ func (mr *MockWalletKitClientMockRecorder) ListAccounts(ctx, name, addressType i
|
|||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAccounts", reflect.TypeOf((*MockWalletKitClient)(nil).ListAccounts), ctx, name, addressType)
|
||||
}
|
||||
|
||||
// ListLeases mocks base method.
|
||||
func (m *MockWalletKitClient) ListLeases(ctx context.Context) ([]lndclient.LeaseDescriptor, error) {
|
||||
m.ctrl.T.Helper()
|
||||
ret := m.ctrl.Call(m, "ListLeases", ctx)
|
||||
ret0, _ := ret[0].([]lndclient.LeaseDescriptor)
|
||||
ret1, _ := ret[1].(error)
|
||||
return ret0, ret1
|
||||
}
|
||||
|
||||
// ListLeases indicates an expected call of ListLeases.
|
||||
func (mr *MockWalletKitClientMockRecorder) ListLeases(ctx interface{}) *gomock.Call {
|
||||
mr.mock.ctrl.T.Helper()
|
||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListLeases", reflect.TypeOf((*MockWalletKitClient)(nil).ListLeases), ctx)
|
||||
}
|
||||
|
||||
// ListSweeps mocks base method.
|
||||
func (m *MockWalletKitClient) ListSweeps(ctx context.Context) ([]string, error) {
|
||||
m.ctrl.T.Helper()
|
||||
|
|
|
|||
|
|
@ -48,6 +48,12 @@ func (m *MockWalletKit) ListUnspent(context.Context, int32, int32,
|
|||
return nil, nil
|
||||
}
|
||||
|
||||
func (m *MockWalletKit) ListLeases(
|
||||
context.Context) ([]lndclient.LeaseDescriptor, error) {
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (m *MockWalletKit) LeaseOutput(context.Context, wtxmgr.LockID,
|
||||
wire.OutPoint, time.Duration) (time.Time, error) {
|
||||
|
||||
|
|
|
|||
|
|
@ -3,24 +3,17 @@ package poolrpc
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/lightninglabs/protobuf-hex-display/jsonpb"
|
||||
"github.com/lightninglabs/protobuf-hex-display/proto"
|
||||
)
|
||||
|
||||
var (
|
||||
jsonMarshaler = &jsonpb.Marshaler{
|
||||
EmitDefaults: true,
|
||||
OrigName: true,
|
||||
}
|
||||
"github.com/lightningnetwork/lnd/lnrpc"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
// PrintMsg prints a protobuf message as JSON, suitable for logging (without any
|
||||
// indentation).
|
||||
func PrintMsg(message proto.Message) string {
|
||||
jsonStr, err := jsonMarshaler.MarshalToString(message)
|
||||
jsonBytes, err := lnrpc.ProtoJSONMarshalOpts.Marshal(message)
|
||||
if err != nil {
|
||||
return fmt.Sprintf("<unable to decode proto msg: %v>", err)
|
||||
}
|
||||
|
||||
return jsonStr
|
||||
return string(jsonBytes)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc-gen-go v1.30.0
|
||||
// protoc v3.6.1
|
||||
// source: trader.proto
|
||||
|
||||
|
|
@ -4087,7 +4087,7 @@ type LeaseDurationResponse struct {
|
|||
|
||||
// Deprecated, use lease_duration_buckets.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in trader.proto.
|
||||
LeaseDurations map[uint32]bool `protobuf:"bytes,1,rep,name=lease_durations,json=leaseDurations,proto3" json:"lease_durations,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
|
||||
// The set of lease durations the market is currently accepting and the state
|
||||
// the duration buckets currently are in.
|
||||
|
|
@ -4126,7 +4126,7 @@ func (*LeaseDurationResponse) Descriptor() ([]byte, []int) {
|
|||
return file_trader_proto_rawDescGZIP(), []int{48}
|
||||
}
|
||||
|
||||
// Deprecated: Do not use.
|
||||
// Deprecated: Marked as deprecated in trader.proto.
|
||||
func (x *LeaseDurationResponse) GetLeaseDurations() map[uint32]bool {
|
||||
if x != nil {
|
||||
return x.LeaseDurations
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -2598,14 +2598,11 @@
|
|||
"protobufAny": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type_url": {
|
||||
"@type": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"format": "byte"
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"rpcStatus": {
|
||||
"type": "object",
|
||||
|
|
|
|||
|
|
@ -437,11 +437,11 @@ func testTaprootSpend(t *testing.T, expiryPath bool, version Version) {
|
|||
}
|
||||
|
||||
_, traderSession, err := input.MuSig2CreateContext(
|
||||
muSig2Version, trader, signerKeys, tweak,
|
||||
muSig2Version, trader, signerKeys, tweak, nil,
|
||||
)
|
||||
require.NoError(t, err)
|
||||
_, auctioneerSession, err := input.MuSig2CreateContext(
|
||||
muSig2Version, auctioneer, signerKeys, tweak,
|
||||
muSig2Version, auctioneer, signerKeys, tweak, nil,
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
|
|
|
|||
|
|
@ -349,12 +349,11 @@ func ESig(w io.Writer, val interface{}, buf *[8]byte) error {
|
|||
if v, ok := val.(**ecdsa.Signature); ok {
|
||||
var s [64]byte
|
||||
if *v != nil {
|
||||
rawSig := (*v).Serialize()
|
||||
sig, err := lnwire.NewSigFromRawSignature(rawSig)
|
||||
sig, err := lnwire.NewSigFromSignature(*v)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
copy(s[:], sig[:])
|
||||
copy(s[:], sig.RawBytes())
|
||||
}
|
||||
|
||||
return tlv.EBytes64(w, &s, buf)
|
||||
|
|
@ -372,13 +371,16 @@ func DSig(r io.Reader, val interface{}, buf *[8]byte, l uint64) error {
|
|||
}
|
||||
|
||||
if s != ZeroSignature {
|
||||
wireSig := lnwire.Sig(s)
|
||||
wireSig, err := lnwire.NewSigFromWireECDSA(s[:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
ecSig, err := wireSig.ToSignature()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
*v = ecSig
|
||||
*v = ecSig.(*ecdsa.Signature)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/btcsuite/btcd/btcec/v2/ecdsa"
|
||||
"github.com/lightninglabs/lndclient"
|
||||
"github.com/lightningnetwork/lnd/keychain"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
|
|
@ -35,7 +36,7 @@ func SignOffer(ctx context.Context, ticket *Ticket,
|
|||
if err != nil {
|
||||
return fmt.Errorf("error signing offer: %v", err)
|
||||
}
|
||||
wireSig, err := lnwire.NewSigFromRawSignature(rawSig)
|
||||
wireSig, err := lnwire.NewSigFromECDSARawSignature(rawSig)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error parsing raw signature: %v", err)
|
||||
}
|
||||
|
|
@ -43,7 +44,7 @@ func SignOffer(ctx context.Context, ticket *Ticket,
|
|||
if err != nil {
|
||||
return fmt.Errorf("error parsing EC signature: %v", err)
|
||||
}
|
||||
ticket.Offer.SigOfferDigest = ecSig
|
||||
ticket.Offer.SigOfferDigest = ecSig.(*ecdsa.Signature)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
@ -120,7 +121,7 @@ func SignOrder(ctx context.Context, ticket *Ticket, bidNonce [32]byte,
|
|||
if err != nil {
|
||||
return fmt.Errorf("error signing order: %v", err)
|
||||
}
|
||||
wireSig, err := lnwire.NewSigFromRawSignature(rawSig)
|
||||
wireSig, err := lnwire.NewSigFromECDSARawSignature(rawSig)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error parsing raw signature: %v", err)
|
||||
}
|
||||
|
|
@ -128,7 +129,7 @@ func SignOrder(ctx context.Context, ticket *Ticket, bidNonce [32]byte,
|
|||
if err != nil {
|
||||
return fmt.Errorf("error parsing EC signature: %v", err)
|
||||
}
|
||||
ticket.Order.SigOrderDigest = ecSig
|
||||
ticket.Order.SigOrderDigest = ecSig.(*ecdsa.Signature)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue