diff --git a/core/state_transition_ovm.go b/core/state_transition_ovm.go index 5a51cb2f9..a22ac16b1 100644 --- a/core/state_transition_ovm.go +++ b/core/state_transition_ovm.go @@ -98,7 +98,7 @@ func asOvmMessage(tx *types.Transaction, signer types.Signer, decompressor commo // inserting into Geth so we can make transactions easily parseable. However, this means that // we need to re-encode the transactions before executing them. var data = new(bytes.Buffer) - data.WriteByte(getSignatureType(msg)) // 1 byte: 00 == EIP 155, 02 == ETH Sign Message + data.WriteByte(uint8(msg.SignatureHashType())) // 1 byte: 00 == EIP 155, 01 == ETH Sign Message data.Write(fillBytes(r, 32)) // 32 bytes: Signature `r` parameter data.Write(fillBytes(s, 32)) // 32 bytes: Signature `s` parameter data.Write(fillBytes(v, 1)) // 1 byte: Signature `v` parameter @@ -180,18 +180,6 @@ func modMessage( return outmsg, nil } -func getSignatureType( - msg Message, -) uint8 { - if msg.SignatureHashType() == 0 { - return 0 - } else if msg.SignatureHashType() == 1 { - return 2 - } else { - return 1 - } -} - func getQueueOrigin( queueOrigin *big.Int, ) (types.QueueOrigin, error) { diff --git a/rollup/types.go b/rollup/types.go index 78ea2e968..f8d7dd61e 100644 --- a/rollup/types.go +++ b/rollup/types.go @@ -243,8 +243,8 @@ type CTCTransactionType uint8 const ( CTCTransactionTypeEIP155 CTCTransactionType = 0 - CTCTransactionTypeEOA CTCTransactionType = 1 - CTCTransactionTypeEthSign CTCTransactionType = 2 + CTCTransactionTypeEthSign CTCTransactionType = 1 + CTCTransactionTypeEOA CTCTransactionType = 2 ) type CTCTransaction struct {