Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: NPE and wrong profit #13

Merged
merged 2 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading