Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qiweiii committed Oct 23, 2024
1 parent d208337 commit ca31d47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RPC/Sources/RPC/Handlers/ChainHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ struct ChainHandler {
}
let state = try await source.getState(hash: data32)
// return state root for now
return state?.stateRoot.description
return ["stateRoot": state?.stateRoot.description]
} else {
// return best block state by default
let block = try await source.getBestBlock()
let state = try await source.getState(hash: block.hash)
return state?.stateRoot.description
return ["stateRoot": state?.stateRoot.description]
}
}
}

0 comments on commit ca31d47

Please sign in to comment.