This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module agora.test.BlockSerialize; | |
| version (unittest): | |
| import agora.common.Amount; | |
| import agora.common.BitField; | |
| import agora.common.crypto.Key; | |
| import agora.common.Hash; | |
| import agora.common.Serializer; | |
| import agora.common.Types; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| index ecf0099..2327506 100644 | |
| --- a/src/Stoa.ts | |
| +++ b/src/Stoa.ts | |
| @@ -54,23 +54,29 @@ class Stoa { | |
| let preimage_hash: string = row.preimage_hash; | |
| let preimage_distance: number = row.preimage_distance; | |
| let height_preimage = new Hash(); | |
| + let start_index: number = row.enrolled_at + 1; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module agora.test.BlockSerialize; | |
| version (unittest): | |
| import agora.common.Amount; | |
| import agora.common.crypto.Key; | |
| import agora.common.Hash; | |
| import agora.common.Serializer; | |
| import agora.common.Types; | |
| import agora.consensus.data.Block; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [{"header":{"prev_block":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","height":{"value":0},"merkle_root":"0x747e1080925af0fda8e8116eaa9f91d047bfa768d71433848ea869258cbecafa7dcaae0d8ceb63cf7d47ca293fa6314c6fd9055ab633c966628234fa13ec16a6","validators":{"_storage":[]},"signature":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","enrollments":[{"utxo_key":"0x190dd12450d9f1972e21e39d676d9e5bb690071d98ed5c0859077e409741912a4baf07dabc2c879725f0af67f783bbb0161c68d55ef6835639eaaedff2317561","random_seed":"0xc9934f17f6115f9b489b3a3f68f08d695c92912c3fba5691f3396de151160cb171fce29d36ae315780554abeead208c1e3920f7167515405f0148c0587a7d878","cycle_length":1008,"enroll_sig":"0x01924db86527d68926bb387154b035c5dd6dbe499490da90cfdc878cac0d98a8e70b0b8f35a4d70a8bfd8c53183816ddaae73eefcbdc8ad715452b0ed62fedf0"},{"utxo_key":"0x4028965b7408566a66e4cf8c603a1cdebc7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [{"header":{"prev_block":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","height":{"value":0},"merkle_root":"0x747e1080925af0fda8e8116eaa9f91d047bfa768d71433848ea869258cbecafa7dcaae0d8ceb63cf7d47ca293fa6314c6fd9055ab633c966628234fa13ec16a6","validators":{"_storage":[]},"signature":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","enrollments":[{"utxo_key":"0x190dd12450d9f1972e21e39d676d9e5bb690071d98ed5c0859077e409741912a4baf07dabc2c879725f0af67f783bbb0161c68d55ef6835639eaaedff2317561","random_seed":"0xc9934f17f6115f9b489b3a3f68f08d695c92912c3fba5691f3396de151160cb171fce29d36ae315780554abeead208c1e3920f7167515405f0148c0587a7d878","cycle_length":1008,"enroll_sig":"0x01924db86527d68926bb387154b035c5dd6dbe499490da90cfdc878cac0d98a8e70b0b8f35a4d70a8bfd8c53183816ddaae73eefcbdc8ad715452b0ed62fedf0"},{"utxo_key":"0x4028965b7408566a66e4cf8c603a1cdebc7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* tslint:disable */ | |
| /** | |
| * This file was automatically generated by json-schema-to-typescript. | |
| * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, | |
| * and run json-schema-to-typescript to regenerate this file. | |
| */ | |
| export interface IBitField { | |
| _storage: number[]; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import std.stdio; | |
| import vibe.core.core; | |
| public struct TestBlock | |
| { | |
| string data; | |
| } | |
| void pushBlock1 () @safe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import vibe.core.core; | |
| import vibe.core.log; | |
| import vibe.http.router; | |
| import vibe.http.server; | |
| import vibe.web.rest; | |
| import vibe.data.json; | |
| import std.uri; | |
| public struct TestBlock | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [nodemon] 2.0.4 | |
| [nodemon] to restart at any time, enter `rs` | |
| [nodemon] watching path(s): src/**/* | |
| [nodemon] watching extensions: ts,json | |
| [nodemon] starting `ts-node src/main.ts` | |
| Express server listening at 3836 | |
| [Object: null prototype] { | |
| '{"header":{"prev_block":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","height":{"value":0},"merkle_root":"0xc650b573ab70777363924a0eb2c84cbc76005ba8083c5c77dd57a09f4b6e14f98136ba0d84661109d0b7619877b814cf950cd7fe7b14eaa46bef254352791951","validators":{"_storage":[]},"signature":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","enrollments":[{"utxo_key":"0x210b66053c73e7bd7b27673706f0272617d09b8cda76605e91ab66ad1cc3bfc1f3f5fede91fd74bb2d2073de587c6ee495cfb0d981f03a83651b48ce0e576a1a","random_seed":"0xfb05e20321ae11b2f799a71a736fd172c5dec39540f53d6213cd1b7522898c8bfb86445c6b6db9437899f5917bb5f9c9be7358ba0ec |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| unittest | |
| { | |
| import agora.common.Serializer; | |
| import std.stdio; | |
| import std.format; | |
| KeyPair[] validator = [ | |
| WK.Keys[0], |