blockchain_go
blockchain_go copied to clipboard
A simplified blockchain implementation in Golang
If a user has a balance of 2, and now he initiates a transaction with a payment of 2, and then a transaction with a payment of 2 when no...
update the function getBalance based on the update of the function NewBlockchain.
Edit the function NewBlockchain: 1.delete the parameter of the function,the parameter is not used. 2.fix the description of the function,the description is not right.
Hi there Thanks for your great article. I just wanted to know the differences between `fmt.Sprintf("%s", []byte)` and `string([]byte[:])`? Are there any advantages in one way (you're using the first...
Merkle tree's length should be 2^n, not 2*n. For example, when there are 5 leaf nodes, it should be append to a length of eight not six.
Indexes of TXOutput is different in TXOutputs and Transaction, use index in utxo to initialize inputs of transaction then put it into block is wrong.
When I send transaction without -mine flag, so when I wait for the miner node to mine, I get an error on FindTransaction() method. ```panic: transaction does not exist goroutine...
In line 157 blockchain.go, it seems that TXOutputs has never been declared, is it TXOutput[] or I miss something?
Hi!In the 4th part,If someone transfers money to himself,his account balance will be double。 if out.CanBeUnlockedWith(address) { unspentTXs = append(unspentTXs, *tx) } There is a “break” missing here!This statement is...