ethDataToMsg() converts the ethereum tx data (message proto bytes) to a message
(messageType string, transaction *lib.Transaction, msg lib.MessageI, data []byte, callback func())
| 168 | |
| 169 | // ethDataToMsg() converts the ethereum tx data (message proto bytes) to a message |
| 170 | func ethDataToMsg(messageType string, transaction *lib.Transaction, msg lib.MessageI, data []byte, callback func()) (lib.MessageI, lib.ErrorI) { |
| 171 | // set the message type |
| 172 | transaction.MessageType = messageType |
| 173 | // convert the data after the selector to a message |
| 174 | if err := lib.Unmarshal(data[4:], msg); err != nil { |
| 175 | return nil, err |
| 176 | } |
| 177 | // execute the callback |
| 178 | if callback != nil { |
| 179 | callback() |
| 180 | } |
| 181 | // sanity check the message |
| 182 | return msg, msg.Check() |
| 183 | } |
| 184 | |
| 185 | // VerifyRLPBytes() implements special 'signature verification logic' that allows a MessageSend to be authenticated using a signed RLP transaction |
| 186 | func (s *StateMachine) VerifyRLPBytes(tx *lib.Transaction) lib.ErrorI { |
no test coverage detected