Skip to content

Commit 39c8fa3

Browse files
fix(dash-spv-ffi): make cbindgen-friendly
1 parent 40b0d94 commit 39c8fa3

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

dash-spv-ffi/src/platform_integration.rs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,18 @@ pub unsafe extern "C" fn ffi_dash_spv_get_quorum_public_key(
117117

118118
let engine_guard = engine.blocking_read();
119119
let (before, _after) = engine_guard.masternode_lists_around_height(core_chain_locked_height);
120-
let Some(ml) = before else {
121-
return FFIResult::error(
122-
FFIErrorCode::ValidationError,
123-
&format!(
124-
"No masternode list found at or before height {}",
125-
core_chain_locked_height
126-
),
127-
);
120+
let ml = match before {
121+
Some(ml) => ml,
122+
None => {
123+
return FFIResult::error(
124+
FFIErrorCode::ValidationError,
125+
&format!(
126+
"No masternode list found at or before height {}",
127+
core_chain_locked_height
128+
),
129+
);
130+
}
131+
};
128132

129133
let list_height = ml.known_height;
130134
match ml.quorums.get(&llmq_type) {

0 commit comments

Comments
 (0)