MCPcopy Create free account
hub / github.com/PageLeay/celestial-runtime / assertBlock

Function assertBlock

lib.esm/_tests/test-providers-data.js:122–137  ·  view source on GitHub ↗
(actual, expected)

Source from the content-addressed store, hash-verified

120 }
121}
122function assertBlock(actual, expected) {
123 // Check transactions
124 for (let i = 0; i < expected.transactions.length; i++) {
125 const expectedTx = expected.transactions[i];
126 if (typeof (expectedTx) === "string") {
127 assert.equal(actual.transactions[i], expectedTx, `block.transactions[${i}]`);
128 }
129 else {
130 throw new Error("@TODO");
131 }
132 }
133 // Remove the transactions and test keys
134 expected = Object.assign({}, expected, { transactions: undefined, test: undefined });
135 // Check remaining keys
136 assertObj("block", actual, expected);
137}
138function assertTransaction(actual, expected) {
139 // @TODO: Accesslist
140 // Check signature

Callers 1

Calls 1

assertObjFunction · 0.70

Tested by

no test coverage detected