浏览代码

EVM unit tests: test the non-breaking format change fields

commit-id:3a26e554
Stan Drozd 3 年之前
父节点
当前提交
bb9b892b4f
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6 2
      ethereum/test/pyth.js

+ 6 - 2
ethereum/test/pyth.js

@@ -187,6 +187,10 @@ contract("Pyth", function () {
             assert.equal(parsed.attestations[i].timestamp, timestamp);
             assert.equal(parsed.attestations[i].num_publishers, 123212);
             assert.equal(parsed.attestations[i].max_num_publishers, 321232);
+            assert.equal(parsed.attestations[i].publish_time, 0xdeadbeef);
+            assert.equal(parsed.attestations[i].prev_publish_time, 0xdeadbabe);
+            assert.equal(parsed.attestations[i].prev_price, 0xdeadfacebeef);
+            assert.equal(parsed.attestations[i].prev_conf, 0xbadbadbeef);
 
             console.debug(`attestation ${i + 1}/${parsed.attestations.length} parsed OK`);
       }
@@ -266,7 +270,7 @@ contract("Pyth", function () {
 
     it("should show stale cached prices as unknown", async function() {
         let smallestTimestamp = 1;
-      let rawBatch = generateRawBatchAttestation(smallestTimestamp, 1337);
+        let rawBatch = generateRawBatchAttestation(smallestTimestamp, 1337);
         await attest(this.pythProxy, rawBatch);
 
         for (var i = 1; i <= RAW_BATCH_ATTESTATION_COUNT; i++) {
@@ -278,7 +282,7 @@ contract("Pyth", function () {
 
     it("should show cached prices too far into the future as unknown", async function() {
         let largestTimestamp = 4294967295;
-      let rawBatch = generateRawBatchAttestation(largestTimestamp, 1337);
+        let rawBatch = generateRawBatchAttestation(largestTimestamp, 1337);
         await attest(this.pythProxy, rawBatch);
 
         for (var i = 1; i <= RAW_BATCH_ATTESTATION_COUNT; i++) {