Solved: The real actual value not the count of values

Vertnode - An automated solution for installing Vertcoin node(s) on Single Board Computers

Hello Vertcoin Community,
Eager to contribute to the Vertcoin Community I began creating step by step walkthrough guides on how to get a Vertcoin node up and running on a Raspberry Pi, Raspberry Pi Zero and Intel NUC. Along with information to get a Vertcoin node up and running was also optional steps to install p2pool-vtc.
I decided that while this step by step guide might be helpful to a few, a setup script may prove to be useful to a wider range of people. I have this script to a point where I think it may be productive to share with a bigger audience, for those who are brave and have this hardware sitting around or like to tinker with projects; I invite you to test this setup script if you are interested, if you run into errors any sort of verbose console output of the error proves to be extremely helpful in troubleshooting.
The script was designed to produce a “headless” server... meaning we will not be using a GUI to configure Vertcoin or check to see how things are running. In fact, once the server is set up, you will only interact with it using command line calls over SSH. The idea is to have this full node be simple, low-power, with optimized memory usage and something that “just runs” in your basement, closet, etc.
Why run a headless node on a Single Board Computer?
The idea is to have this full node be simple, low-power, with optimized memory usage and something that “just runs” in your basement, closet, etc.
Required: USB Flash Drive 6GB - 32GB
Please note that the script was designed for Single Board Computers first and looks for an accessible USB Flash Drive to use for storing the blockchain and swap file, as constant writing to a microSD can degrade the health of the microSD.
Supports

Hardware

All of the hardware listed above is hardware that I have personally tested / am testing on myself. The plan is to continue expanding my arsenal of single board computers and continue to add support for more hardware to ensure as much compatibility as possible.
Functionality
It is worth noting that LIT can be ran with multiple configurations, the ones displayed in the Post Installation Report reflect values that run LIT with the Vertcoin Mainnet. Please be aware that the Vertcoin Testnet chain has not been mined 100% of the time in the past, if you make transactions on the Vertcoin testnet that do not go through it is likely because the chain has stopped being mined.
BE CAREFUL WITH YOUR COINS, ONLY TEST WITH WHAT YOU ARE OKAY WITH LOSING IF YOU USE THE MAINNET.

Vertcoin Testnet Coins

https://tvtc.blkidx.org/faucet/
I've included some documentation on LIT I created which includes information I found to be useful: https://github.com/e-corp-sam-sepiol/vertnode/blob/mastedocs/lit.md
Please visit the mit-dci/lit github repository for the most up to date information on lit: https://github.com/mit-dci/lit

Vertnode | Automated Vertcoin Node Installation Script

https://github.com/e-corp-sam-sepiol/vertnode

Recommended: Use Etcher to install the chosen OS to your microSD card / USB flash drive.

If you intend on installing Ubuntu Server 16.04 to your Intel NUC please use Etcher to install the .iso to your USB flash drive.
https://etcher.io/
PLEASE NOTE THIS SCRIPT MAY GIVE AN ERROR. THIS IS THE NATURE OF TESTING. PLEASE REPORT YOUR ERRORS IF YOU WANT THEM TO BE FIXED/RESOLVED. THANK YOU FOR BETTERING THE DEVELOPMENT OF THIS SCRIPT.

Ubuntu Server 16.04 Setup Details

You can use different clients to ssh into your node. One option is using PuTTY or Git Bash on Windows which is included in the desktop version of Git. If you are using Linux you can simply open a new terminal window and ssh to the IP address of your node (hardware you intend installing the Vertcoin node on).
You will need to know the IP address of your node, this can be found on your router page.
ssh 192.168.1.5 -l pi For example, this command uses ssh to login to 192.168.1.5 using the -l login name of pi. The IP address of your node will likely be different for you, in this example I am logging into a Raspberry Pi which has a default login name of pi.
A brief list of commands that can be used to check on the Vertcoin node status:
vertcoin-cli getblockchaininfo | Grab information about your blockchain
vertcoin-cli getblockcount | Grab the current count of blocks on your node
vertcoin-cli getconnectioncount | Grab the current count of connections to your node. A number of connections larger than 8 means that you have incoming connections to your node. The default settings are to make 8 outgoing connections. If you want incoming connections please port forward your Raspberry Pi in your Router settings page.
vertcoin-cli getpeerinfo | Grab the information about the peers you have connected to / are connected to
vertcoin-cli getnettotals | Grab network data, how much downloaded/upload displayed in bytes
tail -f ~/.vertcoin/debug.log | Output the latest lines in the Vertcoin debug.log to see verbose information about the Vertcoin daemon (ctrl+c to stop)
Thank you to all who have helped me and inspired me thus far, @b17z, @jamesl22, @vertcoinmarketingteam, @canen, @flakfired, @etang600, @BDF, @tucker178, @Xer0
This work is dedicated to the users of Vertcoin, thank you for making this possible.
7/20/2018 Thank you @CommodoreAmiga for the incredibly generous tip <3
You can reach me @Sam Sepiol#3396 on the Vertcoin Discord, here on reddit or @ [email protected]
submitted by ecorp-sam-sepiol to vertcoin [link] [comments]

function return value undefined with node js

Hi guys,

I'm new in the javascript world and now I have a problem with a simple function that returns value because this value is not defined, but if I print the value in the function with console.log, the result is correct

My class with the function
const {createBitcoinRpc} = require('@carnesen/bitcoin-rpc'); module.exports = WrapperRPC; var bitcoinRpc; function WrapperRPC(rpcuser, rpcpassword) { this.rpcuser = rpcuser; this.rpcpassword = rpcpassword; this.rpcHref = 'http://' + this.rpcuser + ':' + this.rpcpassword + '@127.0.0.1:8332'; bitcoinRpc = createBitcoinRpc(this.rpcHref); //TODO settin this variable } WrapperRPC.prototype.getDimensionBlockchain = function(){ console.debug("the url is:" + this.rpcHref); bitcoinRpc("getblockcount").then(result => { console.debug("The result command is: " + result); this.result = result; return this.result; }).catch(exception => { console.error('exception generated: ' + exception) }) }; WrapperRPC.prototype.getHashBlock = function (heightBlock) { console.debug("Run command getblockhash"); bitcoinRpc('getblockhash', { height: heightBlock }).then(result => { console.debug("The result command is: " + result); this.result = result; return this.result; }).catch(exception => { console.error('exception generated: ' + exception) }); } 
My main
const express = require('express'); const app = express(); const port = 3000; const WrapperRPC = require('./model/WrapperRPCBitcoin'); var path = require('path'); app.get('/', function(req, res) { res.sendFile(path.join(__dirname + '/index.html')); console.log("try to run rpc"); let rpc = new WrapperRPC('vincent', 'vincent'); let numbarBlock = rpc.getDimensionBlockchain(); console.debug("height blockchain: " + numbarBlock); for(i = 0; i < numbarBlock; i++){ var hashBlock = rpc.getHashBlock(i); console.debug('Hash block ' + i + ' is: ' + hashBlock); } }); // Console will print the message app.listen(port, () => console.log(`Example app listening on port ${port} at the link http://localhost:${port}/`)); 
My log
Example app listening on port 3000 at the link http://localhost:3000/ try to run rpc the url is:http://vincent:[email protected]:8332 height blockchain: undefined The result command is: 586965 
The log is correct The result command is: 586965 but is printed after the height blockchain: undefined What happens in JavaScript?
submitted by crazyjoker96 to learnjavascript [link] [comments]

Help understanding raw transactions

I'm struggling a bit with understanding raw transactions. I understand from the Bitcoin wiki that the input(s) reference previous transactions as the source of funds. Then the outputs is how the source of funds is paid out. Typically if there are two outputs, it is because the entire input transaction must be spent and so one output is the payment and the second output is the remainder being paid back to self.
This all makes sense until I went to look at a ReddCoin transaction. I used getblockcount then getblockhash, then getblock to retrieve the latest confirmed block. Then looked at one of the transactions with getrawtransaction then decoderawtransaction.
Here is the transaction I looked at: ece8f2411a3c0193ee59b4e22ee6cab4e0f15e480e61bfad018fc0c4f76758b4
There is one input and two outputs. Both outputs are equal value and paid to the same wallet. The input transaction is a similar transaction where two outputs both paid to the same wallet but the value is double. The input of that transaction is the same again but with the value doubled.
I can't understand what the point of this transaction would be. Someone with a balance of x is sending a two payments to self of x/2. Then when that transaction is confirmed, each output is then used to make two more payments to self of x/2/2 and so on.
Can someone explain this to me? Is this related to staking?
submitted by CaptainCryptogram to reddCoin [link] [comments]

EXPLOSIVE BITCOIN PUMP THIS WEEK?! - Bitcoin Price Analysis HUGE BITCOIN PRICE CORRECTION POSSIBLE...??? - YouTube Top Reasons Why Bitcoin's True Value is $50,000! Bitcoin Cost & Price Bitcoin Today & Bitcoin Money & Bitcoin Value in Dollars & Bitcoin Account BITCOIN PRICE PLUMMETS IN MINUTES!  WHAT IS NEXT FOR BTC?

Have you ever found yourself counting blocks? Maybe you want to find all instances of a certain block on a specified layer. There's a super-fast way of getting an accurate block count in a drawing using the Quick Select feature. Quick Select also speeds up the process of locating blocks or any other objects with certain properties. Prepare for the Walkthrough The purpose of the following steps You would like to know how many block references are in an AutoCAD drawing. Use the Express Tools command BCOUNT to generate a list of blocks. Follow these steps: At the command prompt, enter bcount. When prompted to select objects, either make a selection or enter all. Press F2 to open the AutoCAD text window. A list of blocks and the number of references present in the drawing will be Returns the corresponding block information according to the specified hash value: getblock <index> [verbose=0] Returns the corresponding block information according to the specified index: getblockcount: Gets the number of blocks in the main chain: getblockhash <index> Returns the hash value of the corresponding block based on the specified index Method getblockcount returns the count of the blocks in the main chain. The first parameter of Method getblock is <index> which is the block index. Block index = Block height = The count of the blocks – 1. If getblockcount returns 1234, you should use getblock 1233 to get the information of the latest block. Block Time (average time between blocks) 9m 32s: Blocks Count: 651,716 (2020-10-07 22:15:08 UTC)Block Size: 897.822 KBytes: Blocks last 24h: 151: Blocks avg. per hour (last 24h) 6: Reward Per Block

[index] [30889] [21687] [10288] [25249] [11427] [21388] [30214] [21696] [11911] [13961]

EXPLOSIVE BITCOIN PUMP THIS WEEK?! - Bitcoin Price Analysis

Bitcoin Cost & Price Bitcoin Today & Bitcoin Money & Bitcoin Value in Dollars & Bitcoin Account. bitcoin companies bitcoin conversion rate bitcoin cost bitcoin currency chart bitcoin daily chart ... What it really takes to mine a Bitcoin in 10 Minutes. Firstly I'll show you a special free method to mine Bitcoin and send funds directly to your wallet in 1... Welcome to Team Underground, I (Thomas) do weekly BTC price analysis on YouTube. I've been full time trading bitcoins for over a year now and I've decided to share some of my analysis on YouTube ... Bitcoin price drops 15% in a matter of minutes. What does this mean for bitcoin bulls? Is btc even bullish anymore? Here is what you can look out for on the bitcoin charts. Free Bitcoin Mining with Bitcoin Values 1BTC Per Week Speed (TH/s) - Duration: 3:02. How To Make Money Online For Free 3,395 views

#