From 1306ecda41bcd4a4ab9ab4dd76aba5735dc7a887 Mon Sep 17 00:00:00 2001 From: Captain Dero Date: Sat, 24 Feb 2018 09:46:12 +0000 Subject: [PATCH] Total Circulating Supply added in status cmd. --- blockchain/transaction_verify.go | 3 ++- build_all.sh | 4 ++-- cmd/derod/main.go | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/blockchain/transaction_verify.go b/blockchain/transaction_verify.go index 0826732..aa92fff 100644 --- a/blockchain/transaction_verify.go +++ b/blockchain/transaction_verify.go @@ -260,6 +260,7 @@ func (chain *Blockchain) Verify_Transaction_NonCoinbase(tx *transaction.Transact // a similiar block level check is done for double spending attacks within the block itself // check whether the key image is already used or spent earlier ( in blockchain ) +/* for i := 0; i < len(tx.Vin); i++ { k_image := ringct.Key(tx.Vin[i].(transaction.Txin_to_key).K_image) if chain.Read_KeyImage_Status(crypto.Hash(k_image)) { @@ -270,7 +271,7 @@ func (chain *Blockchain) Verify_Transaction_NonCoinbase(tx *transaction.Transact return false } } - +*/ // check whether the TX contains a signature or NOT switch tx.RctSignature.Get_Sig_Type() { case ringct.RCTTypeSimple, ringct.RCTTypeFull: // default case, pass through diff --git a/build_all.sh b/build_all.sh index 99329b7..57f11ec 100644 --- a/build_all.sh +++ b/build_all.sh @@ -16,8 +16,8 @@ bash $ABSDIR/build_package.sh "github.com/deroproject/derosuite/cmd/dero-wallet- cd "${ABSDIR}/build" #windows users require zip files -zip -r windows-amd64.zip windows_amd64 -zip -r windows-x86.zip windows_386 +zip -r dero_windows_amd64.zip dero_windows_amd64 +zip -r dero_windows_386.zip dero_windows_386 #all other platforms are okay with tar.gz find . -mindepth 1 -type d -not -name '*windows*' -exec tar --owner=dummy --group=dummy -cvzf {}.tar.gz {} \; diff --git a/cmd/derod/main.go b/cmd/derod/main.go index 7a8f95e..ae57245 100644 --- a/cmd/derod/main.go +++ b/cmd/derod/main.go @@ -373,7 +373,9 @@ func main() { // fmt.Printf("chain diff %d\n",chain.Get_Difficulty_At_Block(chain.Top_ID)) //fmt.Printf("chain nw rate %d\n", chain.Get_Network_HashRate()) inc, out := p2p.Peer_Direction_Count() - fmt.Printf("Network %s Height %d NW Hashrate %0.03f MH/sec TH %s Peers %d inc, %d out MEMPOOL size %d\n", globals.Config.Name, chain.Get_Height(), float64(chain.Get_Network_HashRate())/1000000.0, chain.Get_Top_ID(), inc, out, len(chain.Mempool.Mempool_List_TX())) +supply := chain.Load_Already_Generated_Coins_for_BL_ID(chain.Get_Top_ID()) +supply -= (2000000* 1000000000000) // remove premine +fmt.Printf("Network %s Height %d NW Hashrate %0.03f MH/sec TH %s Peers %d inc, %d out MEMPOOL size %d Total Circulating Supply %s DERO \n", globals.Config.Name, chain.Get_Height(), float64(chain.Get_Network_HashRate())/1000000.0, chain.Get_Top_ID(), inc, out, len(chain.Mempool.Mempool_List_TX()), globals.FormatMoney(supply)) case strings.ToLower(line) == "sync_info": p2p.Connection_Print() case strings.ToLower(line) == "bye":