Merkle root is 32 bytes
This commit is contained in:
parent
efafa43910
commit
b625f0d519
|
@ -24,7 +24,7 @@ struct Ask {
|
|||
|
||||
struct Content {
|
||||
string cid; // content id, used to download the dataset
|
||||
bytes merkleRoot; // merkle root of the dataset, used to verify storage proofs
|
||||
bytes32 merkleRoot; // merkle root of the dataset, used to verify storage proofs
|
||||
}
|
||||
|
||||
enum RequestState {
|
||||
|
|
|
@ -3,7 +3,7 @@ const { keccak256, defaultAbiCoder } = ethers.utils
|
|||
|
||||
function requestId(request) {
|
||||
const Ask = "tuple(int64, uint256, uint256, uint256, uint256, uint256, int64)"
|
||||
const Content = "tuple(string, bytes)"
|
||||
const Content = "tuple(string, bytes32)"
|
||||
const Request =
|
||||
"tuple(address, " + Ask + ", " + Content + ", uint256, bytes32)"
|
||||
return keccak256(defaultAbiCoder.encode([Request], requestToArray(request)))
|
||||
|
|
Loading…
Reference in New Issue