Disable merkle proofs for v2 get_block (#3487)

* api v2 get_blocks should not include Merkle proofs

* default to not including merkle proofs in v2 get_blocks api
This commit is contained in:
Antioch Peverell
2020-11-09 19:56:01 +00:00
committed by GitHub
parent 49cccea035
commit e6145db743
2 changed files with 10 additions and 2 deletions
+9 -1
View File
@@ -132,7 +132,15 @@ where
chain: self.chain.clone(),
};
let hash = block_handler.parse_inputs(height, hash, commit)?;
block_handler.get_block(&hash, true, true)
// We include the rangeproof by default.
let include_proof = true;
// We do *not* include the Merkle proof.
// These are not actively used and expensive to generate for historical blocks.
let include_merkle_proof = false;
block_handler.get_block(&hash, include_proof, include_merkle_proof)
}
/// Returns the node version and block header version (used by grin-wallet).