Skip to content

Commit

Permalink
Merge pull request hyperledger-archives#912 from silasdavis/state
Browse files Browse the repository at this point in the history
Refactor state into refs and tree.
  • Loading branch information
Sean Young authored Sep 19, 2018
2 parents c6fd3d3 + 40b6e80 commit 01d018a
Show file tree
Hide file tree
Showing 34 changed files with 2,325 additions and 247 deletions.
6 changes: 3 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

[[constraint]]
name = "github.com/tendermint/iavl"
version = "=0.10.0"
version = "=0.11.0"

# Haven't made a release since 2016.
[[constraint]]
Expand Down
4 changes: 2 additions & 2 deletions deploy/def/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (c *Client) Dial(chainAddress, keysClientAddress string) error {
logrus.Info("Using mempool signing since no keyClient set, pass --keys to sign locally or elsewhere")
c.MempoolSigning = true
} else {
logrus.Info("Using keys server at: %s", keysClientAddress)
logrus.Infof("Using keys server at: %s", keysClientAddress)
c.keyClient, err = keys.NewRemoteKeyClient(keysClientAddress, logging.NewNoopLogger())
}

Expand Down Expand Up @@ -227,7 +227,7 @@ func (c *Client) UpdateAccount(arg *GovArg) (*payload.GovTx, error) {
if c.keyClient != nil {
publicKey, err := c.keyClient.PublicKey(*update.Address)
if err != nil {
logrus.Info("Could not retrieve public key for %v from keys server", *update.Address)
logrus.Infof("Could not retrieve public key for %v from keys server", *update.Address)
} else {
update.PublicKey = &publicKey
}
Expand Down
2 changes: 1 addition & 1 deletion execution/evm/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ func (vm *VM) call(callState *state.Cache, caller acm.Account, callee *acm.Mutab

case GASPRICE_DEPRECATED: // 0x3A
stack.Push(Zero256)
vm.Debugf(" => %X (GASPRICE IS DEPRECATED)\n")
vm.Debugf(" => %X (GASPRICE IS DEPRECATED)\n", Zero256)

case EXTCODESIZE: // 0x3B
addr := stack.Pop()
Expand Down
8 changes: 4 additions & 4 deletions execution/execution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ func TestTxSequence(t *testing.T) {
func TestNameTxs(t *testing.T) {
st, err := MakeGenesisState(dbm.NewMemDB(), testGenesisDoc)
require.NoError(t, err)
st.writeState.save()
st.writeState.commit()

names.MinNameRegistrationPeriod = 5
exe := makeExecutor(st)
Expand Down Expand Up @@ -1196,7 +1196,7 @@ func TestMerklePanic(t *testing.T) {
acc0 := getAccount(st, privAccounts[0].Address())
acc1 := getAccount(st, privAccounts[1].Address())

st.writeState.save()
st.writeState.commit()
// SendTx.
{
tx := &payload.SendTx{
Expand Down Expand Up @@ -1238,7 +1238,7 @@ func TestMerklePanic(t *testing.T) {
err := makeExecutor(stateCallTx).signExecuteCommit(tx, privAccounts[0])
require.NoError(t, err)
}
st.writeState.save()
st.writeState.commit()
trygetacc0 := getAccount(st, privAccounts[0].Address())
fmt.Println(trygetacc0.Address())
}
Expand Down Expand Up @@ -1499,7 +1499,7 @@ func makeGenesisState(numAccounts int, randBalance bool, minBalance uint64, numV
if err != nil {
panic(fmt.Errorf("could not make genesis state: %v", err))
}
s0.writeState.save()
s0.writeState.commit()
return s0, privAccounts
}

Expand Down
Loading

0 comments on commit 01d018a

Please sign in to comment.