Skip to content

Commit

Permalink
BroadcastRBF -> BroadcastReplacement
Browse files Browse the repository at this point in the history
  • Loading branch information
someone235 committed Sep 13, 2024
1 parent 0c51953 commit 8153ec7
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 53 deletions.
2 changes: 1 addition & 1 deletion cmd/kaspawallet/broadcast_replacement.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func broadcastReplacement(conf *broadcastConfig) error {
return err
}

response, err := daemonClient.BroadcastRBF(ctx, &pb.BroadcastRequest{Transactions: transactions})
response, err := daemonClient.BroadcastReplacement(ctx, &pb.BroadcastRequest{Transactions: transactions})
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/kaspawallet/bump_fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func bumpFee(conf *bumpFeeConfig) error {
}

chunk := signedTransactions[offset:end]
response, err := daemonClient.BroadcastRBF(broadcastCtx, &pb.BroadcastRequest{Transactions: chunk})
response, err := daemonClient.BroadcastReplacement(broadcastCtx, &pb.BroadcastRequest{Transactions: chunk})
if err != nil {
return err
}
Expand Down
62 changes: 31 additions & 31 deletions cmd/kaspawallet/daemon/pb/kaspawalletd.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions cmd/kaspawallet/daemon/pb/kaspawalletd.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ service kaspawalletd {
rpc NewAddress(NewAddressRequest) returns (NewAddressResponse) {}
rpc Shutdown(ShutdownRequest) returns (ShutdownResponse) {}
rpc Broadcast(BroadcastRequest) returns (BroadcastResponse) {}
// BroadcastRBF assumes that all transactions depend on the first one
rpc BroadcastRBF(BroadcastRequest) returns (BroadcastResponse) {}
// BroadcastReplacement assumes that all transactions depend on the first one
rpc BroadcastReplacement(BroadcastRequest) returns (BroadcastResponse) {}
// Since SendRequest contains a password - this command should only be used on
// a trusted or secure connection
rpc Send(SendRequest) returns (SendResponse) {}
Expand Down
26 changes: 14 additions & 12 deletions cmd/kaspawallet/daemon/pb/kaspawalletd_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ import (
"github.com/pkg/errors"
)

func (s *server) BroadcastRBF(_ context.Context, request *pb.BroadcastRequest) (*pb.BroadcastResponse, error) {
func (s *server) BroadcastReplacement(_ context.Context, request *pb.BroadcastRequest) (*pb.BroadcastResponse, error) {
s.lock.Lock()
defer s.lock.Unlock()

txIDs, err := s.broadcastRBF(request.Transactions, request.IsDomain)
txIDs, err := s.broadcastReplacement(request.Transactions, request.IsDomain)
if err != nil {
return nil, err
}

return &pb.BroadcastResponse{TxIDs: txIDs}, nil
}

// broadcastRBF assumes that all transactions depend on the first one
func (s *server) broadcastRBF(transactions [][]byte, isDomain bool) ([]string, error) {
// broadcastReplacement assumes that all transactions depend on the first one
func (s *server) broadcastReplacement(transactions [][]byte, isDomain bool) ([]string, error) {

txIDs := make([]string, len(transactions))
var tx *externalapi.DomainTransaction
Expand Down
2 changes: 1 addition & 1 deletion cmd/kaspawallet/daemon/server/bump_fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (s *server) BumpFee(_ context.Context, request *pb.BumpFeeRequest) (*pb.Bum
return nil, err
}

txIDs, err := s.broadcastRBF(signedTransactions, false)
txIDs, err := s.broadcastReplacement(signedTransactions, false)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const (
// appBuild is defined as a variable so it can be overridden during the build
// process with '-ldflags "-X github.com/kaspanet/kaspad/version.appBuild=foo"' if needed.
// It MUST only contain characters from validCharacters.
var appBuild string = "rc1"
var appBuild string = "rc2"

var version = "" // string used for memoization of version

Expand Down

0 comments on commit 8153ec7

Please sign in to comment.