Skip to content

Commit 5fdb3ac

Browse files
committed
fix(ag-chain-cosmos): keep SwingSet state in the validator state dir
Closes #433
1 parent 1aaf14f commit 5fdb3ac

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

packages/cosmic-swingset/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ typings/
8585

8686
# next.js build output
8787
.next
88-
ag-cosmos-chain-state.json
8988
lib/git-revision.txt
9089
agoric/
9190
/binding.gyp

packages/cosmic-swingset/Makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ all: build-cosmos install
2727

2828
scenario0-setup:
2929
rm -rf ~/.ag-chain-cosmos
30-
rm -f ag-cosmos-chain-state.json
3130
python3 -mvenv ve3
3231
ve3/bin/pip install setup-solo/
3332

@@ -49,7 +48,6 @@ scenario1-run-client:
4948
AGC = ./lib/ag-chain-cosmos
5049
scenario2-setup: build-cosmos
5150
rm -rf ~/.ag-chain-cosmos
52-
rm -f ag-cosmos-chain-state.json
5351
$(AGC) init scenario2-chain --chain-id=$(CHAIN_ID)
5452
rm -rf t1
5553
mkdir t1
@@ -148,7 +146,7 @@ start-ag-solo:
148146
cd t1 && ../bin/ag-solo start
149147

150148
show-local-gci:
151-
@./calc-gci.js ~/.ag-cosmos-chain/config/genesis.json
149+
@./calc-gci.js ~/.ag-chain-cosmos/config/genesis.json
152150

153151
set-local-gci-ingress:
154152
set -e; \

packages/cosmic-swingset/lib/ag-chain-cosmos

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const AG_COSMOS_INIT = 'AG_COSMOS_INIT';
1111
// TODO: use the 'basedir' pattern, or find the cosmos state directory
1212
// (~/.ag-chain-cosmos ?), or something anything better than scribbling
1313
// into the current directory.
14-
const stateFile = 'ag-cosmos-chain-state.json';
14+
const stateFile = `${process.env.HOME}/.ag-chain-cosmos/data/ag-cosmos-chain-state.json`;
1515

1616
const { launch } = require('./launch-chain');
1717
const path = require('path');

0 commit comments

Comments
 (0)