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

Function assertBlock

lib.commonjs/_tests/test-providers-data.js:125–140  ·  view source on GitHub ↗
(actual, expected)

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 1

assertObjFunction · 0.70

Tested by

no test coverage detected