(a: Outpoint)
| 38 | impl TryFrom<Outpoint> for JOutpoint { |
| 39 | type Error = tonic::Status; |
| 40 | fn try_from(a: Outpoint) -> Result<Self, Self::Error> { |
| 41 | Ok(JOutpoint { |
| 42 | txid: bitcoin::hashes::sha256::Hash::from_slice(&a.txid).map_err(|e| { |
| 43 | tonic::Status::invalid_argument(format!("Invalid outpoint txid: {e}")) |
| 44 | })?, |
| 45 | outnum: a.outnum, |
| 46 | }) |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | impl TryFrom<Feerate> for cln_rpc::primitives::Feerate { |
nothing calls this directly
no test coverage detected