|
@@ -46,6 +46,15 @@ function fork_off_init() {
|
|
|
yarn workspace api-scripts tsnode-strict src/fork-off.ts
|
|
|
}
|
|
|
|
|
|
+function export_chainspec_file_to_disk() {
|
|
|
+ if ! [[ -f ${DATA_PATH}/exported-state.json ]]; then
|
|
|
+ # write the initial genesis state to db, in order to wait arbitrary amount of time
|
|
|
+ docker-compose -f ../../docker-compose.yml run \
|
|
|
+ -v ${DATA_PATH}:/spec joystream-node export-state \
|
|
|
+ --chain /spec/chain-spec-raw.json \
|
|
|
+ --base-path /data --pruning archive > ${DATA_PATH}/exported-state.json
|
|
|
+ fi
|
|
|
+ }
|
|
|
# entrypoint
|
|
|
function main {
|
|
|
CONTAINER_ID=""
|
|
@@ -63,8 +72,9 @@ function main {
|
|
|
export JOYSTREAM_NODE_TAG=$RUNTIME_TAG
|
|
|
CONTAINER_ID=$(start_node)
|
|
|
|
|
|
- # 120 sec needed to load the chainspec
|
|
|
- sleep 120
|
|
|
+ export_chainspec_file_to_disk
|
|
|
+
|
|
|
+ sleep 30
|
|
|
|
|
|
if ( $POST_MIGRATION_ASYNC_ASSERTIONS ); then
|
|
|
# verify assertion using typsecript
|