Browse Source

Total Circulating Supply added in status cmd.

master
Captain Dero 6 years ago
parent
commit
1306ecda41
3 changed files with 7 additions and 4 deletions
  1. +2
    -1
      blockchain/transaction_verify.go
  2. +2
    -2
      build_all.sh
  3. +3
    -1
      cmd/derod/main.go

+ 2
- 1
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

+ 2
- 2
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 {} \;

+ 3
- 1
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":

Loading…
Cancel
Save