Skip to content

Commit

Permalink
fix: NPE and wrong profit (bnb-chain#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
irrun authored Apr 2, 2024
1 parent dbf64eb commit 98d57b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/ethapi/api_bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (s *PrivateTxBundleAPI) BundlePrice(ctx context.Context) *big.Int {

// SendBundle will add the signed transaction to the transaction pool.
// The sender is responsible for signing the transaction and using the correct nonce and ensuring validity
func (s *PrivateTxBundleAPI) SendBundle(ctx context.Context, args *types.SendBundleArgs) error {
func (s *PrivateTxBundleAPI) SendBundle(ctx context.Context, args types.SendBundleArgs) error {
if len(args.Txs) == 0 {
return newBundleError(errors.New("bundle missing txs"))
}
Expand Down
2 changes: 1 addition & 1 deletion miner/bidder.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func (b *Bidder) bid(work *environment) {
BlockNumber: parent.Number.Uint64() + 1,
ParentHash: parent.Hash(),
GasUsed: work.header.GasUsed,
GasFee: work.profit,
GasFee: work.state.GetBalance(consensus.SystemAddress).ToBig(),
Txs: txs,
// TODO: decide builderFee according to realtime traffic and validator commission
}
Expand Down

0 comments on commit 98d57b2

Please sign in to comment.