Skip to content

Commit

Permalink
Remove unused tx.protected() methods
Browse files Browse the repository at this point in the history
  • Loading branch information
wizeguyy committed Apr 30, 2024
1 parent b94b525 commit fe80bae
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 12 deletions.
1 change: 0 additions & 1 deletion core/types/external_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ func (tx *ExternalTx) copy() TxData {
// accessors for innerTx.
func (tx *ExternalTx) txType() byte { return ExternalTxType }
func (tx *ExternalTx) chainID() *big.Int { panic("external TX does not have chainid") }
func (tx *ExternalTx) protected() bool { return true }
func (tx *ExternalTx) accessList() AccessList { return tx.AccessList }
func (tx *ExternalTx) data() []byte { return tx.Data }
func (tx *ExternalTx) gas() uint64 { return tx.Gas }
Expand Down
1 change: 0 additions & 1 deletion core/types/qi_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ func (tx *WireQiTx) copyFromWire() *QiTx {
// accessors for innerTx.
func (tx *QiTx) txType() byte { return QiTxType }
func (tx *QiTx) chainID() *big.Int { return tx.ChainID }
func (tx *QiTx) protected() bool { return true }
func (tx *QiTx) accessList() AccessList { panic("Qi TX does not have accessList") }
func (tx *QiTx) data() []byte { panic("Qi TX does not have data") }
func (tx *QiTx) gas() uint64 { panic("Qi TX does not have gas") }
Expand Down
1 change: 0 additions & 1 deletion core/types/quai_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ func (tx *QuaiTx) copy() TxData {
// accessors for innerTx.
func (tx *QuaiTx) txType() byte { return QuaiTxType }
func (tx *QuaiTx) chainID() *big.Int { return tx.ChainID }
func (tx *QuaiTx) protected() bool { return true }
func (tx *QuaiTx) accessList() AccessList { return tx.AccessList }
func (tx *QuaiTx) data() []byte { return tx.Data }
func (tx *QuaiTx) gas() uint64 { return tx.Gas }
Expand Down
9 changes: 0 additions & 9 deletions core/types/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -468,15 +468,6 @@ func sanityCheckSignature(v *big.Int, r *big.Int, s *big.Int) error {
return nil
}

func isProtectedV(V *big.Int) bool {
if V.BitLen() <= 8 {
v := V.Uint64()
return v != 27 && v != 28 && v != 1 && v != 0
}
// anything not 27 or 28 is considered protected
return true
}

// Type returns the transaction type.
func (tx *Transaction) Type() uint8 {
return tx.inner.txType()
Expand Down

0 comments on commit fe80bae

Please sign in to comment.