From 9e4ef902f864660126371de3eb43c4938d4b0e35 Mon Sep 17 00:00:00 2001 From: dimxy Date: Mon, 8 Apr 2019 19:21:36 +0500 Subject: [PATCH] loggin --- src/cc/prices.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/cc/prices.cpp b/src/cc/prices.cpp index 6cdfb1e8a..e5922cfa7 100644 --- a/src/cc/prices.cpp +++ b/src/cc/prices.cpp @@ -349,7 +349,7 @@ int64_t prices_syntheticprice(std::vector vec,int32_t height,int32_t m for (i=0; i vec,int32_t height,int32_t m errcode = -1; depth++; break; + case PRICES_WEIGHT: // multiply by weight and consume top of stack by updating price if ( depth == 1 ) { @@ -378,6 +379,7 @@ int64_t prices_syntheticprice(std::vector vec,int32_t height,int32_t m den += ind; // acc weight values } else errcode = -2; break; + case PRICES_MULT: if ( depth >= 2 ) { @@ -386,6 +388,7 @@ int64_t prices_syntheticprice(std::vector vec,int32_t height,int32_t m pricestack[depth++] = (a * b) / SATOSHIDEN; } else errcode = -3; break; + case PRICES_DIV: if ( depth >= 2 ) { @@ -394,6 +397,7 @@ int64_t prices_syntheticprice(std::vector vec,int32_t height,int32_t m pricestack[depth++] = (a * SATOSHIDEN) / b; } else errcode = -4; break; + case PRICES_INV: if ( depth >= 1 ) { @@ -401,6 +405,7 @@ int64_t prices_syntheticprice(std::vector vec,int32_t height,int32_t m pricestack[depth++] = (SATOSHIDEN * SATOSHIDEN) / a; } else errcode = -5; break; + case PRICES_MDD: if ( depth >= 3 ) { @@ -410,6 +415,7 @@ int64_t prices_syntheticprice(std::vector vec,int32_t height,int32_t m pricestack[depth++] = (((a * SATOSHIDEN) / b) * SATOSHIDEN) / c; } else errcode = -6; break; + case PRICES_MMD: if ( depth >= 3 ) { @@ -419,6 +425,7 @@ int64_t prices_syntheticprice(std::vector vec,int32_t height,int32_t m pricestack[depth++] = (a * b) / c; } else errcode = -7; break; + case PRICES_MMM: if ( depth >= 3 ) { @@ -428,6 +435,7 @@ int64_t prices_syntheticprice(std::vector vec,int32_t height,int32_t m pricestack[depth++] = ((a * b) / SATOSHIDEN) * c; } else errcode = -8; break; + case PRICES_DDD: if ( depth >= 3 ) { @@ -437,6 +445,7 @@ int64_t prices_syntheticprice(std::vector vec,int32_t height,int32_t m pricestack[depth++] = (((((SATOSHIDEN * SATOSHIDEN) / a) * SATOSHIDEN) / b) * SATOSHIDEN) / c; } else errcode = -9; break; + default: errcode = -10; break;