mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
accounts, internal, signer: fix linter nits
This commit is contained in:
parent
bcd9790781
commit
9c2bb339aa
4 changed files with 10 additions and 12 deletions
2
accounts/external/backend.go
vendored
2
accounts/external/backend.go
vendored
|
|
@ -245,7 +245,7 @@ func (api *ExternalSigner) SignTx(account accounts.Account, tx *types.Transactio
|
|||
args.Commitments = sidecar.Commitments
|
||||
args.Proofs = sidecar.Proofs
|
||||
}
|
||||
|
||||
|
||||
var res signTransactionResult
|
||||
if err := api.client.Call(&res, "account_signTransaction", args); err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
|
|
@ -1895,9 +1895,9 @@ func (s *TransactionAPI) SignTransaction(ctx context.Context, args TransactionAr
|
|||
// to put back the blob(s).
|
||||
if args.IsEIP4844() {
|
||||
signed = signed.WithBlobTxSidecar(&types.BlobTxSidecar{
|
||||
args.Blobs,
|
||||
args.Commitments,
|
||||
args.Proofs,
|
||||
Blobs: args.Blobs,
|
||||
Commitments: args.Commitments,
|
||||
Proofs: args.Proofs,
|
||||
})
|
||||
}
|
||||
data, err := signed.MarshalBinary()
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ package apitypes
|
|||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/sha256"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
|
@ -28,7 +29,6 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"crypto/sha256"
|
||||
"github.com/ethereum/go-ethereum/accounts"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@
|
|||
package apitypes
|
||||
|
||||
import (
|
||||
"crypto/sha256"
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"crypto/sha256"
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/core/types"
|
||||
"github.com/ethereum/go-ethereum/crypto/kzg4844"
|
||||
|
|
@ -67,7 +67,6 @@ func TestTxArgs(t *testing.T) {
|
|||
wantType: types.DynamicFeeTxType,
|
||||
},
|
||||
} {
|
||||
|
||||
var txArgs SendTxArgs
|
||||
if err := json.Unmarshal(tc.data, &txArgs); err != nil {
|
||||
t.Fatal(err)
|
||||
|
|
@ -110,16 +109,16 @@ func TestTxArgs(t *testing.T) {
|
|||
|
||||
func TestBlobTxs(t *testing.T) {
|
||||
blob := kzg4844.Blob{0x1}
|
||||
committment, err := kzg4844.BlobToCommitment(blob)
|
||||
commitment, err := kzg4844.BlobToCommitment(blob)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
proof, err := kzg4844.ComputeBlobProof(blob, committment)
|
||||
proof, err := kzg4844.ComputeBlobProof(blob, commitment)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
hash := kzg4844.CalcBlobHashV1(sha256.New(), &committment)
|
||||
hash := kzg4844.CalcBlobHashV1(sha256.New(), &commitment)
|
||||
b := &types.BlobTx{
|
||||
ChainID: uint256.NewInt(6),
|
||||
Nonce: 8,
|
||||
|
|
@ -131,7 +130,7 @@ func TestBlobTxs(t *testing.T) {
|
|||
Value: uint256.NewInt(100),
|
||||
Sidecar: &types.BlobTxSidecar{
|
||||
Blobs: []kzg4844.Blob{blob},
|
||||
Commitments: []kzg4844.Commitment{committment},
|
||||
Commitments: []kzg4844.Commitment{commitment},
|
||||
Proofs: []kzg4844.Proof{proof},
|
||||
},
|
||||
}
|
||||
|
|
@ -141,5 +140,4 @@ func TestBlobTxs(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
t.Logf("tx %v", string(data))
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue