Skip to content

Commit 892d15f

Browse files
committed
fix
1 parent 59d480d commit 892d15f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Node/Sources/Node/NetworkingProtocol/NetworkManager.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ public final class NetworkManager: Sendable {
1919
// Those peers will receive all the messages regardless the target
2020
private let devPeers: Set<NetAddr>
2121

22-
public init(config: Network.Config, blockchain: Blockchain, eventBus: EventBus, devPeers: Set<NetAddr>) throws {
22+
public init(config: Network.Config, blockchain: Blockchain, eventBus: EventBus, devPeers: Set<NetAddr>) async throws {
2323
let handler = HandlerImpl(blockchain: blockchain)
24-
network = try Network(
24+
network = try await Network(
2525
config: config,
2626
protocolConfig: blockchain.config,
2727
genesisHeader: blockchain.dataProvider.genesisBlockHash,

Node/Sources/Node/Node.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public class Node {
4848

4949
self.keystore = keystore
5050

51-
network = try NetworkManager(
51+
network = try await NetworkManager(
5252
config: config.network,
5353
blockchain: blockchain,
5454
eventBus: eventBus,

RPC/Sources/RPC/DataSource/Blockchain+DataSource.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Utils
33

44
extension Blockchain: DataSource {
55
public func getBestBlock() async throws -> BlockRef {
6-
try await dataProvider.getBlock(hash: dataProvider.bestHead)
6+
try await dataProvider.getBlock(hash: dataProvider.bestHead.hash)
77
}
88

99
public func getBlock(hash: Data32) async throws -> BlockRef? {

0 commit comments

Comments
 (0)