rskip | title | created | author | purpose | layer | complexity | status | description |
---|---|---|---|---|---|---|---|---|
417 |
Avoid transactions to be reverted when Bridge method calls from smart contracts return an empty response |
28-FEB-24 |
MI |
Usa |
Core |
1 |
Adopted |
RSKIP | 417 |
---|---|
Title | Avoid transactions to be reverted when Bridge method calls from smart contracts return an empty response |
Created | 28-FEB-24 |
Author | MI |
Purpose | Usa |
Layer | Core |
Complexity | 1 |
Status | Adopted |
When a Bridge method with no return value is called from a smart contract it causes the node to throw a null pointer exception and the transaction to be reverted. This RSKIP proposes a change so that no exception is thrown and the transaction is not reverted.
There are currently 6 Bridge methods that have no return value.
- addSignature
- receiveHeaders
- registerBtcCoinbaseTransaction
- registerBtcTransaction
- releaseBtc
- updateCollections
If any of these methods were to be called from a smart contract, the transaction would get automatically reverted.
When the Bridge executes a method that has no return value, return an empty byte array instead of null
.
Copyright and related rights waived via CC0.