MCPcopy Create free account
hub / github.com/Savjee/SavjeeCoin / getLatestBlock

Method getLatestBlock

src/blockchain.js:162–164  ·  view source on GitHub ↗

* Returns the latest block on our chain. Useful when you want to create a * new Block and you need the hash of the previous Block. * * @returns {Block[]}

()

Source from the content-addressed store, hash-verified

160 * @returns {Block[]}
161 */
162 getLatestBlock() {
163 return this.chain[this.chain.length - 1];
164 }
165
166 /**
167 * Takes all the pending transactions, puts them in a Block and starts the

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected