From 4ca2b80812e901964f94060df06384c094d59a16 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Thu, 4 Oct 2018 16:11:50 -0400 Subject: [PATCH] Update StateDB godoc --- state/statedb.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/state/statedb.go b/state/statedb.go index f603401d..39f5ce2e 100644 --- a/state/statedb.go +++ b/state/statedb.go @@ -72,6 +72,12 @@ type CommitStateDB struct { // NewCommitStateDB returns a reference to a newly initialized CommitStateDB // which implements Geth's state.StateDB interface. +// +// CONTRACT: Stores used for state must be cache-wrapped as the ordering of the +// key/value space matters in determining the merkle root. +// +// TODO: Eventually we'll have an EVM module that'll implement a keeper that we +// can pass into this constructor. func NewCommitStateDB(ctx sdk.Context, am auth.AccountMapper, storageKey, codeKey sdk.StoreKey) (*CommitStateDB, error) { return &CommitStateDB{ ctx: ctx,