Send a flashblock to the background processor and wait until it is handled.
(&self, flashblock: Flashblock)
| 75 | |
| 76 | /// Send a flashblock to the background processor and wait until it is handled. |
| 77 | pub async fn send(&self, flashblock: Flashblock) -> Result<()> { |
| 78 | let (tx, rx) = oneshot::channel(); |
| 79 | self.sender.send((flashblock, tx)).await.map_err(|err| eyre::eyre!(err))?; |
| 80 | rx.await.map_err(|err| eyre::eyre!(err))?; |
| 81 | Ok(()) |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | /// Test extension for flashblocks functionality. |
no test coverage detected