From 2a25ece3636015e8429fe4556b62fc84545dc7c7 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 30 Oct 2017 15:01:20 +0200 Subject: Add empty implementation of order state watcher --- src/schemas/order_watcher_config_schema.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/schemas/order_watcher_config_schema.ts (limited to 'src/schemas') diff --git a/src/schemas/order_watcher_config_schema.ts b/src/schemas/order_watcher_config_schema.ts new file mode 100644 index 000000000..a88d2ecfd --- /dev/null +++ b/src/schemas/order_watcher_config_schema.ts @@ -0,0 +1,7 @@ +export const orderWatcherConfigSchema = { + id: '/OrderWatcherConfig', + properties: { + mempoolPollingIntervalMs: {$ref: '/Number'}, + }, + type: 'object', +}; -- cgit v1.2.3 From ed7917f9dfc83ea4dc150fbfc14145f038c9642d Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 30 Oct 2017 15:08:58 +0200 Subject: Fix config schema --- src/schemas/order_watcher_config_schema.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/schemas') diff --git a/src/schemas/order_watcher_config_schema.ts b/src/schemas/order_watcher_config_schema.ts index a88d2ecfd..9c2dc38a4 100644 --- a/src/schemas/order_watcher_config_schema.ts +++ b/src/schemas/order_watcher_config_schema.ts @@ -1,7 +1,10 @@ export const orderWatcherConfigSchema = { id: '/OrderWatcherConfig', properties: { - mempoolPollingIntervalMs: {$ref: '/Number'}, + mempoolPollingIntervalMs: { + type: 'number', + min: 0, + }, }, type: 'object', }; -- cgit v1.2.3 From a896904ae7c453f51b1f46de2be3a28416db72d1 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 30 Oct 2017 18:38:10 +0200 Subject: Add naive order state watcher implementation Revalidate all orders upon event received and emit order states even if not changed --- src/schemas/order_watcher_config_schema.ts | 10 ---------- src/schemas/zero_ex_config_schema.ts | 4 ++++ 2 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 src/schemas/order_watcher_config_schema.ts (limited to 'src/schemas') diff --git a/src/schemas/order_watcher_config_schema.ts b/src/schemas/order_watcher_config_schema.ts deleted file mode 100644 index 9c2dc38a4..000000000 --- a/src/schemas/order_watcher_config_schema.ts +++ /dev/null @@ -1,10 +0,0 @@ -export const orderWatcherConfigSchema = { - id: '/OrderWatcherConfig', - properties: { - mempoolPollingIntervalMs: { - type: 'number', - min: 0, - }, - }, - type: 'object', -}; diff --git a/src/schemas/zero_ex_config_schema.ts b/src/schemas/zero_ex_config_schema.ts index 179e29c31..5be651a9a 100644 --- a/src/schemas/zero_ex_config_schema.ts +++ b/src/schemas/zero_ex_config_schema.ts @@ -5,6 +5,10 @@ export const zeroExConfigSchema = { exchangeContractAddress: {$ref: '/Address'}, tokenRegistryContractAddress: {$ref: '/Address'}, etherTokenContractAddress: {$ref: '/Address'}, + mempoolPollingIntervalMs: { + type: 'number', + min: 0, + }, }, type: 'object', }; -- cgit v1.2.3 From 126a165f558326625d892c4a379c0ebd66088c9a Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 9 Nov 2017 16:59:41 -0500 Subject: Add nested config for orderWatcher --- src/schemas/zero_ex_config_schema.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/schemas') diff --git a/src/schemas/zero_ex_config_schema.ts b/src/schemas/zero_ex_config_schema.ts index 5be651a9a..5a2afeaa2 100644 --- a/src/schemas/zero_ex_config_schema.ts +++ b/src/schemas/zero_ex_config_schema.ts @@ -5,9 +5,14 @@ export const zeroExConfigSchema = { exchangeContractAddress: {$ref: '/Address'}, tokenRegistryContractAddress: {$ref: '/Address'}, etherTokenContractAddress: {$ref: '/Address'}, - mempoolPollingIntervalMs: { - type: 'number', - min: 0, + orderWatcherConfig: { + type: 'object', + properties: { + pollingIntervalMs: { + type: 'number', + minimum: 0, + }, + }, }, }, type: 'object', -- cgit v1.2.3 From c0db88168b250ef4db960e9eddced8f5a10ee63f Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 9 Nov 2017 18:29:13 -0500 Subject: Fix bug where we hard-coded using pendingBlock for fetching the orderState. Moved numConfirmations to become a global orderStateWatcher config --- src/schemas/zero_ex_config_schema.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/schemas') diff --git a/src/schemas/zero_ex_config_schema.ts b/src/schemas/zero_ex_config_schema.ts index 5a2afeaa2..6d4b3ed27 100644 --- a/src/schemas/zero_ex_config_schema.ts +++ b/src/schemas/zero_ex_config_schema.ts @@ -12,6 +12,10 @@ export const zeroExConfigSchema = { type: 'number', minimum: 0, }, + numConfirmations: { + type: 'number', + minimum: 0, + }, }, }, }, -- cgit v1.2.3