Skip to content
Snippets Groups Projects

Changes to reflect the upgrade of duniter to polkadot 1.6.0

Closed Carles Barrobés requested to merge txels/duniter-squid:upgrade-duniter into main
All threads resolved!
1 file
+ 3
1
Compare changes
  • Side-by-side
  • Inline
+ 3
1
@@ -11,7 +11,9 @@ export async function saveGenesis(ctx: Ctx, block: Block) {
ctx.log.info("Loading genesis");
// Read genesis json
const genesis: Genesis = JSON.parse(readFileSync(path.resolve(process.cwd(), genesis_path)).toString()).genesis.runtimeAndCode.runtime;
const genesisData = JSON.parse(readFileSync(path.resolve(process.cwd(), genesis_path)).toString()).genesis;
// Accomodate for versions of polkadot before and after 1.6.0:
const genesis: Genesis = genesisData.runtimeAndCode?.runtime || genesisData.runtimeGenesis.patch;
const accounts: Map<Address, Account> = new Map();
const identities: Map<IdtyIndex, Identity> = new Map();
Loading