Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ extension Accumulation {
for (service, _) in accumulateOutput.gasUsed {
if accumulateStats[service] != nil { continue }

let digests = accumulated.compactMap(\.digests).flatMap { $0 }
let digests = accumulated.compactMap(\.digests).flatMap(\.self)
let num = digests.filter { $0.serviceIndex == service }.count

if num == 0 { continue }
Expand Down
2 changes: 1 addition & 1 deletion Database/Sources/RocksDBSwift/Store.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public final class Store<CFKey: ColumnFamilyKey, Coder: StoreCoder>: Sendable {

public func exists(key: Coder.Key) throws -> Bool {
let encodedKey = try coder.encode(key: key)
// it seems like
// it seems like there is no way to check if a key exists so we just try to get it
return try db.get(column: column, key: encodedKey) != nil
}

Expand Down
5 changes: 4 additions & 1 deletion Node/Sources/Node/ChainSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ public struct ChainSpec: Codable, Equatable {
public func getState() throws -> [Data31: Data] {
var output: [Data31: Data] = [:]
for (key, value) in genesisState {
try output[Data31(fromHexString: key).unwrap()] = value
guard let dataKey = Data31(fromHexString: key) else {
throw GenesisError.invalidFormat("Invalid genesisState key format: \(key) (not valid hex)")
}
output[dataKey] = value
}
return output
}
Expand Down
3 changes: 2 additions & 1 deletion Tools/Sources/CTools/ctools.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#pragma once

#include <fcntl.h>

/**
Expand All @@ -13,5 +15,4 @@
*/
int emitAddExample(void *codePtr);


int ctools_shm_open(const char *name, int oflag, mode_t mode);
2 changes: 1 addition & 1 deletion Tools/Sources/Tools/Tools.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import TracingUtils
import Utils

@main
struct Boka: AsyncParsableCommand {
struct Tools: AsyncParsableCommand {
static let configuration = CommandConfiguration(
abstract: "Boka Tools",
version: "0.0.1",
Expand Down