From 2dd54beb1dcdd7e32ba09b197725295673129e91 Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Thu, 21 Mar 2019 03:11:17 +0300 Subject: [PATCH 1/7] RICK & MORTY --- src/ac/morty | 2 ++ src/ac/rick | 2 ++ src/assetchains.json | 15 +++++++++++++++ src/assetchains.old | 3 ++- src/fiat/morty | 2 ++ src/fiat/rick | 2 ++ 6 files changed, 25 insertions(+), 1 deletion(-) create mode 100755 src/ac/morty create mode 100755 src/ac/rick create mode 100755 src/fiat/morty create mode 100755 src/fiat/rick diff --git a/src/ac/morty b/src/ac/morty new file mode 100755 index 000000000..4579324b7 --- /dev/null +++ b/src/ac/morty @@ -0,0 +1,2 @@ +#!/bin/bash +./komodo-cli -ac_name=MORTY $1 $2 $3 $4 $5 $6 diff --git a/src/ac/rick b/src/ac/rick new file mode 100755 index 000000000..b68bd56ab --- /dev/null +++ b/src/ac/rick @@ -0,0 +1,2 @@ +#!/bin/bash +./komodo-cli -ac_name=RICK $1 $2 $3 $4 $5 $6 diff --git a/src/assetchains.json b/src/assetchains.json index dfc352a2f..a37e13208 100644 --- a/src/assetchains.json +++ b/src/assetchains.json @@ -243,6 +243,21 @@ "ac_supply": "10000000000", "ac_cc": "2", "addnode": ["51.75.122.83"] + }, + { + "ac_name": "RICK", + "ac_supply": "90000000000", + "ac_reward": "100000000", + "ac_cc": "3", + "addnode": ["138.201.136.145"] + }, + { + "ac_name": "MORTY", + "ac_supply": "90000000000", + "ac_reward": "100000000", + "ac_cc": "3", + "addnode": ["138.201.136.145"] } + ] diff --git a/src/assetchains.old b/src/assetchains.old index cc85f1cd1..d200d26bd 100755 --- a/src/assetchains.old +++ b/src/assetchains.old @@ -47,4 +47,5 @@ echo $pubkey ./komodod -pubkey=$pubkey -ac_name=KSB -ac_supply=1000000000 -ac_end=1 -ac_public=1 -addnode=37.187.225.231 & ./komodod -pubkey=$pubkey -ac_name=OUR -ac_reward=1478310502 -ac_halving=525600 -ac_cc=42 -ac_supply=100000000 -ac_perc=77700 -ac_staked=93 -ac_pubkey=02652a3f3e00b3a1875a918314f0bac838d6dd189a346fa623f5efe9541ac0b98c -ac_public=1 -addnode=51.255.195.65 -addnode=217.182.129.38 -addnode=37.187.225.231 & ./komodod -pubkey=$pubkey -ac_name=ILN -ac_supply=10000000000 -ac_cc=2 -addressindex=1 -spentindex=1 -addnode=51.75.122.83 & - +./komodod -pubkey=$pubkey -ac_name=RICK -ac_supply=90000000000 -ac_reward=100000000 -ac_cc=3 -addnode=138.201.136.145 & +./komodod -pubkey=$pubkey -ac_name=MORTY -ac_supply=90000000000 -ac_reward=100000000 -ac_cc=3 -addnode=138.201.136.145 & diff --git a/src/fiat/morty b/src/fiat/morty new file mode 100755 index 000000000..99cfa9a09 --- /dev/null +++ b/src/fiat/morty @@ -0,0 +1,2 @@ +#!/bin/bash +./komodo-cli -ac_name=EQL $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/rick b/src/fiat/rick new file mode 100755 index 000000000..99cfa9a09 --- /dev/null +++ b/src/fiat/rick @@ -0,0 +1,2 @@ +#!/bin/bash +./komodo-cli -ac_name=EQL $1 $2 $3 $4 $5 $6 From dc9bb80448fe15d7448dfd4dfef52ca9befa0029 Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Thu, 21 Mar 2019 15:31:27 +0300 Subject: [PATCH 2/7] fix --- src/fiat/morty | 2 +- src/fiat/rick | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fiat/morty b/src/fiat/morty index 99cfa9a09..4579324b7 100755 --- a/src/fiat/morty +++ b/src/fiat/morty @@ -1,2 +1,2 @@ #!/bin/bash -./komodo-cli -ac_name=EQL $1 $2 $3 $4 $5 $6 +./komodo-cli -ac_name=MORTY $1 $2 $3 $4 $5 $6 diff --git a/src/fiat/rick b/src/fiat/rick index 99cfa9a09..b68bd56ab 100755 --- a/src/fiat/rick +++ b/src/fiat/rick @@ -1,2 +1,2 @@ #!/bin/bash -./komodo-cli -ac_name=EQL $1 $2 $3 $4 $5 $6 +./komodo-cli -ac_name=RICK $1 $2 $3 $4 $5 $6 From 017100bc96b1ac086dd587c7a16538e9ede9a095 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 11 Apr 2019 03:35:28 -1100 Subject: [PATCH 3/7] pindexFork != 0 && --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 593a41e3f..0ebc5c892 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4241,7 +4241,7 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo // stay on the same chain tip! int32_t notarizedht,prevMoMheight; uint256 notarizedhash,txid; notarizedht = komodo_notarized_height(&prevMoMheight,¬arizedhash,&txid); - if ( pindexFork->GetHeight() < notarizedht ) + if ( pindexFork != 0 && pindexFork->GetHeight() < notarizedht ) { fprintf(stderr,"pindexFork->GetHeight().%d is < notarizedht %d, so ignore it\n",(int32_t)pindexFork->GetHeight(),notarizedht); return state.DoS(100, error("ActivateBestChainStep(): pindexFork->GetHeight().%d is < notarizedht %d, so ignore it",(int32_t)pindexFork->GetHeight(),notarizedht), From a767d4f03f6c72f4a6e853afa136abf3a14000bb Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 11 Apr 2019 03:35:52 -1100 Subject: [PATCH 4/7] pindexFork != 0 && --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 593a41e3f..0ebc5c892 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4241,7 +4241,7 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo // stay on the same chain tip! int32_t notarizedht,prevMoMheight; uint256 notarizedhash,txid; notarizedht = komodo_notarized_height(&prevMoMheight,¬arizedhash,&txid); - if ( pindexFork->GetHeight() < notarizedht ) + if ( pindexFork != 0 && pindexFork->GetHeight() < notarizedht ) { fprintf(stderr,"pindexFork->GetHeight().%d is < notarizedht %d, so ignore it\n",(int32_t)pindexFork->GetHeight(),notarizedht); return state.DoS(100, error("ActivateBestChainStep(): pindexFork->GetHeight().%d is < notarizedht %d, so ignore it",(int32_t)pindexFork->GetHeight(),notarizedht), From 9d0cc33d147f2fc542ab3949d84a4ac965672a69 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 11 Apr 2019 03:36:20 -1100 Subject: [PATCH 5/7] pindexFork != 0 && --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 593a41e3f..0ebc5c892 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4241,7 +4241,7 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo // stay on the same chain tip! int32_t notarizedht,prevMoMheight; uint256 notarizedhash,txid; notarizedht = komodo_notarized_height(&prevMoMheight,¬arizedhash,&txid); - if ( pindexFork->GetHeight() < notarizedht ) + if ( pindexFork != 0 && pindexFork->GetHeight() < notarizedht ) { fprintf(stderr,"pindexFork->GetHeight().%d is < notarizedht %d, so ignore it\n",(int32_t)pindexFork->GetHeight(),notarizedht); return state.DoS(100, error("ActivateBestChainStep(): pindexFork->GetHeight().%d is < notarizedht %d, so ignore it",(int32_t)pindexFork->GetHeight(),notarizedht), From 4f3253fdc903713237d0d5b379d72c4527307d79 Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Sun, 14 Apr 2019 18:56:10 +0300 Subject: [PATCH 6/7] VOTE2019 --- src/ac/vote2019 | 2 ++ src/assetchains.json | 6 ++++++ src/assetchains.old | 1 + src/fiat/vote2019 | 2 ++ 4 files changed, 11 insertions(+) create mode 100755 src/ac/vote2019 create mode 100755 src/fiat/vote2019 diff --git a/src/ac/vote2019 b/src/ac/vote2019 new file mode 100755 index 000000000..029558808 --- /dev/null +++ b/src/ac/vote2019 @@ -0,0 +1,2 @@ +#!/bin/bash +./komodo-cli -ac_name=VOTE2019 $1 $2 $3 $4 $5 $6 diff --git a/src/assetchains.json b/src/assetchains.json index d40d63f29..87173697b 100644 --- a/src/assetchains.json +++ b/src/assetchains.json @@ -257,5 +257,11 @@ "ac_reward": "100000000", "ac_cc": "3", "addnode": ["138.201.136.145"] + }, +{ + "ac_name": "VOTE2019", + "ac_supply": "123651638", + "ac_public": "1", + "addnode": ["95.213.238.98"] } ] diff --git a/src/assetchains.old b/src/assetchains.old index d200d26bd..8f0d763b5 100755 --- a/src/assetchains.old +++ b/src/assetchains.old @@ -49,3 +49,4 @@ echo $pubkey ./komodod -pubkey=$pubkey -ac_name=ILN -ac_supply=10000000000 -ac_cc=2 -addressindex=1 -spentindex=1 -addnode=51.75.122.83 & ./komodod -pubkey=$pubkey -ac_name=RICK -ac_supply=90000000000 -ac_reward=100000000 -ac_cc=3 -addnode=138.201.136.145 & ./komodod -pubkey=$pubkey -ac_name=MORTY -ac_supply=90000000000 -ac_reward=100000000 -ac_cc=3 -addnode=138.201.136.145 & +./komodod -pubkey=$pubkey -ac_name=VOTE2019 -ac_supply=123651638 -ac_public=1 -addnode=95.213.238.98 & diff --git a/src/fiat/vote2019 b/src/fiat/vote2019 new file mode 100755 index 000000000..029558808 --- /dev/null +++ b/src/fiat/vote2019 @@ -0,0 +1,2 @@ +#!/bin/bash +./komodo-cli -ac_name=VOTE2019 $1 $2 $3 $4 $5 $6 From f087f49c4dc2e27d729386e39d239e4dcda2e519 Mon Sep 17 00:00:00 2001 From: Mihailo Milenkovic Date: Mon, 15 Apr 2019 16:00:03 +0200 Subject: [PATCH 7/7] Fix looking for wrong type marker in Oracles CC --- src/cc/oracles.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cc/oracles.cpp b/src/cc/oracles.cpp index 1b13a00b7..54e9202e1 100644 --- a/src/cc/oracles.cpp +++ b/src/cc/oracles.cpp @@ -197,7 +197,7 @@ int64_t OracleCurrentDatafee(uint256 reforacletxid,char *markeraddr,CPubKey publ { uint256 txid,oracletxid,hashBlock; int64_t datafee=0,dfee; int32_t dheight=0,vout,height,numvouts; CTransaction tx; CPubKey pk; std::vector > unspentOutputs; - SetCCunspents(unspentOutputs,markeraddr,true); + SetCCunspents(unspentOutputs,markeraddr,false); for (std::vector >::const_iterator it=unspentOutputs.begin(); it!=unspentOutputs.end(); it++) { txid = it->first.txhash; @@ -306,7 +306,7 @@ uint256 OraclesBatontxid(uint256 reforacletxid,CPubKey refpk) batontxid = zeroid; cp = CCinit(&C,EVAL_ORACLES); CCtxidaddr(markeraddr,reforacletxid); - SetCCunspents(unspentOutputs,markeraddr,true); + SetCCunspents(unspentOutputs,markeraddr,false); //char str[67]; fprintf(stderr,"markeraddr.(%s) %s\n",markeraddr,pubkey33_str(str,(uint8_t *)&refpk)); for (std::vector >::const_iterator it=unspentOutputs.begin(); it!=unspentOutputs.end(); it++) { @@ -532,7 +532,7 @@ int32_t oracleprice_add(std::vector &publishers,CPubKey if ( format[0] != 'L' ) return(0); cp = CCinit(&C,EVAL_ORACLES); - SetCCunspents(unspentOutputs,markeraddr,true); + SetCCunspents(unspentOutputs,markeraddr,false); for (std::vector >::const_iterator it=unspentOutputs.begin(); it!=unspentOutputs.end(); it++) { txid = it->first.txhash; @@ -992,7 +992,7 @@ UniValue OracleInfo(uint256 origtxid) result.push_back(Pair("description",description)); result.push_back(Pair("format",format)); result.push_back(Pair("marker",markeraddr)); - SetCCunspents(unspentOutputs,markeraddr,true); + SetCCunspents(unspentOutputs,markeraddr,false); for (std::vector >::const_iterator it=unspentOutputs.begin(); it!=unspentOutputs.end(); it++) { txid = it->first.txhash;