Unverified Commit 19824372 authored by Péter Szilágyi's avatar Péter Szilágyi Committed by GitHub

core/types: un-ssz blob txs, add json marshalling and tweaks (#27256)

parent dffd804c
......@@ -198,7 +198,7 @@ func (tx *Transaction) decodeTyped(b []byte) (TxData, error) {
return &inner, err
case BlobTxType:
var inner BlobTx
err := rlp.DecodeBytes(b[1:], &inner) // TODO(karalabe): This needs to be ssz
err := rlp.DecodeBytes(b[1:], &inner)
return &inner, err
default:
return nil, ErrTxTypeNotSupported
......@@ -417,11 +417,7 @@ func (tx *Transaction) Size() uint64 {
return size.(uint64)
}
c := writeCounter(0)
if tx.Type() == BlobTxType {
rlp.Encode(&c, &tx.inner) // TODO(karalabe): Replace with SSZ encoding
} else {
rlp.Encode(&c, &tx.inner)
}
size := uint64(c)
if tx.Type() != LegacyTxType {
......
This diff is collapsed.
......@@ -31,7 +31,7 @@ type BlobTx struct {
GasTipCap *uint256.Int // a.k.a. maxPriorityFeePerGas
GasFeeCap *uint256.Int // a.k.a. maxFeePerGas
Gas uint64
To *common.Address // `rlp:"nil"` // nil means contract creation
To *common.Address `rlp:"nil"` // nil means contract creation
Value *uint256.Int
Data []byte
AccessList AccessList
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment