Uh oh!
There was an error while loading. Please reload this page.
refactor: batcher non-paying messages - #1066
Conversation
| send_message(ws_conn_sink.clone(), ValidityResponseMessage::InvalidProof).await; | ||
| return Ok(()); // Send error message to the client and return | ||
| } | ||
| if user_balance == U256::from(0) { |
There was a problem hiding this comment.
I don't understand why here we check if the balance is zero instead of checking for the actual cost of the verification.
There was a problem hiding this comment.
I think this is because it's a non-paying message, so there isn't any particular balance the user needs to reach, as long as it's not empty. If that's the case, it's worth a code comment.
| nonced_verification_data: NoncedVerificationData, | ||
| ws_conn_sink: Arc<RwLock<SplitSink<WebSocketStream<TcpStream>, Message>>>, | ||
| nonce_value: U256, | ||
| ) -> bool { |
There was a problem hiding this comment.
This function can never fail, but the return of the boolean is just to keep the consistency with the other methods and to account for a future failing point. Please tell me if I should better remove it.
uri-99
left a comment
There was a problem hiding this comment.
Blocking PR until Entropidelic's refactor is pushed
uri-99
commented
Oct 3, 2024
Closing as solved in #1106 |
Changes
Refactors the
handle_messagefunction in thebatcher, unifying thenon_payingcase.Test
These new changes can be tested by setting up a local environment and:
non-payingaddress and verifying that the batcher pays for us.Closes#1006