Remove wasm blob.

This commit is contained in:
FiveMovesAhead 2024-09-23 14:04:18 +08:00
parent fc943702c5
commit 00055da089
4 changed files with 3 additions and 7 deletions

View File

@ -256,7 +256,6 @@ class Wasm(FromDict):
algorithm_id: str
details: WasmDetails
state: WasmState
wasm_blob: Optional[bytes]
@dataclass
class TopUpDetails(FromDict):

View File

@ -165,7 +165,7 @@ async fn setup_cache<T: Context>(
}
let mut mempool_wasms = Vec::new();
for mut wasm in ctx
.get_wasms(WasmsFilter::Mempool, false)
.get_wasms(WasmsFilter::Mempool)
.await
.unwrap_or_else(|e| panic!("mempool_wasms error: {:?}", e))
{
@ -219,7 +219,7 @@ async fn setup_cache<T: Context>(
1
};
let wasm = ctx
.get_wasms(WasmsFilter::AlgorithmId(algorithm.id.clone()), false)
.get_wasms(WasmsFilter::AlgorithmId(algorithm.id.clone()))
.await
.unwrap_or_else(|e| panic!("get_wasms error: {:?}", e));
if !state.banned

View File

@ -120,7 +120,7 @@ pub trait Context {
include_data: bool,
) -> ContextResult<Vec<Proof>>;
async fn get_topups(&self, filter: TopUpsFilter) -> ContextResult<Vec<TopUp>>;
async fn get_wasms(&self, filter: WasmsFilter, include_data: bool) -> ContextResult<Vec<Wasm>>;
async fn get_wasms(&self, filter: WasmsFilter) -> ContextResult<Vec<Wasm>>;
async fn verify_solution(
&self,
settings: &BenchmarkSettings,
@ -185,7 +185,6 @@ pub trait Context {
&self,
algorithm_id: &String,
details: WasmDetails,
wasm_blob: Option<Vec<u8>>,
) -> ContextResult<()>;
// Updates

View File

@ -86,7 +86,6 @@ serializable_struct_with_getters! {
algorithm_id: String,
details: WasmDetails,
state: Option<WasmState>,
wasm_blob: Option<Vec<u8>>,
}
}
@ -328,7 +327,6 @@ serializable_struct_with_getters! {
WasmDetails {
compile_success: bool,
download_url: Option<String>,
checksum: Option<String>,
}
}
serializable_struct_with_getters! {