mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 20:29:23 +00:00
Fix panic causable by remote node
This commit is contained in:
@@ -201,8 +201,11 @@ impl SpendableOutput {
|
|||||||
&mut self,
|
&mut self,
|
||||||
rpc: &Rpc<RPC>,
|
rpc: &Rpc<RPC>,
|
||||||
) -> Result<(), RpcError> {
|
) -> Result<(), RpcError> {
|
||||||
self.global_index =
|
self.global_index = *rpc
|
||||||
rpc.get_o_indexes(self.output.absolute.tx).await?[usize::from(self.output.absolute.o)];
|
.get_o_indexes(self.output.absolute.tx)
|
||||||
|
.await?
|
||||||
|
.get(usize::from(self.output.absolute.o))
|
||||||
|
.ok_or(RpcError::InvalidNode)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user