diff --git a/config/tendermint/config.go b/config/tendermint/config.go index 6378607fe..74d7aefeb 100644 --- a/config/tendermint/config.go +++ b/config/tendermint/config.go @@ -70,6 +70,7 @@ func GetConfig(rootDir string) cfg.Config { mapConfig.SetDefault("cswal_light", false) mapConfig.SetDefault("block_size", 10000) + mapConfig.SetDefault("disable_data_hash", false) mapConfig.SetDefault("timeout_propose", 3000) mapConfig.SetDefault("timeout_propose_delta", 500) mapConfig.SetDefault("timeout_prevote", 1000) diff --git a/config/tendermint_test/config.go b/config/tendermint_test/config.go index b90fe2549..c2690ae90 100644 --- a/config/tendermint_test/config.go +++ b/config/tendermint_test/config.go @@ -88,6 +88,7 @@ func GetConfig(rootDir string) cfg.Config { mapConfig.SetDefault("cswal_light", false) mapConfig.SetDefault("block_size", 10000) + mapConfig.SetDefault("disable_data_hash", false) mapConfig.SetDefault("timeout_propose", 100) mapConfig.SetDefault("timeout_propose_delta", 1) mapConfig.SetDefault("timeout_prevote", 1) diff --git a/types/block.go b/types/block.go index 1e197c621..f2d1ef578 100644 --- a/types/block.go +++ b/types/block.go @@ -336,6 +336,10 @@ type Data struct { } func (data *Data) Hash() []byte { + if config.GetBool("disable_data_hash") { + data.hash = []byte{} + return data.hash + } if data.hash == nil { txs := make([]interface{}, len(data.Txs)) for i, tx := range data.Txs {