Commit Graph

95 Commits

Author SHA1 Message Date
Ivan Kuznetsov 3e491be4d7 Use the UTXO set to send coins 2017-09-17 11:49:59 +07:00
Ivan Kuznetsov 0b7d2ac63f Remove Blockchain.FindUTXO 2017-09-17 11:33:58 +07:00
Ivan Kuznetsov e3739acac9 Use the UTXO set to get balance 2017-09-17 11:01:29 +07:00
Ivan Kuznetsov c3aa678291 Implment UTXOSet.FindUTXO 2017-09-17 11:01:18 +07:00
Ivan Kuznetsov b15e1117f9 Implement DeserializeOutputs 2017-09-17 11:01:06 +07:00
Ivan Kuznetsov cb78220abb Remove the 'address' argument from NewBlockchain, since it's not used anymore 2017-09-17 10:43:23 +07:00
Ivan Kuznetsov 7eda539141 Improve UTXOSet 2017-09-17 10:30:30 +07:00
Ivan Kuznetsov 249b7f4eff Implement UTXOSet 2017-09-17 10:16:14 +07:00
Ivan Kuznetsov 2f54328190 Implement TXOutputs 2017-09-17 10:15:58 +07:00
Ivan Kuznetsov 01b9dd2eab Implement Blockchain.FindAllUTXO 2017-09-17 10:04:28 +07:00
Ivan Kuznetsov 56ccd7c8ca Implement rewards 2017-09-17 09:16:50 +07:00
Ivan Kuznetsov 402b298d4f Update README 2017-09-12 21:18:50 +07:00
Ivan Kuznetsov a6394c7afa Fix PubKey resetting 2017-09-12 21:10:18 +07:00
Ivan Kuznetsov b6f7626a13 Fix Signature resetting 2017-09-12 21:09:13 +07:00
Ivan Kuznetsov 465b85d5f2 Fix the 'checksum' function 2017-09-12 20:57:19 +07:00
Ivan Kuznetsov c0b4d6d107 Improve the printchain command 2017-09-10 14:31:01 +07:00
Ivan Kuznetsov 7b6d5695d3 Fix some initializations 2017-09-10 14:11:21 +07:00
Ivan Kuznetsov bf8c5d22e1 Store input sig and key in different fields; rename TXInput.ScriptPubKey to PubKeyHash 2017-09-10 14:05:23 +07:00
Ivan Kuznetsov a436da6c19 Implement ValidateAddress 2017-09-10 13:53:14 +07:00
Ivan Kuznetsov 7290aaac64 Use Hash funcion to set transaction ID 2017-09-10 13:34:47 +07:00
Ivan Kuznetsov 5f9e6c0c91 Extract CLI commands into separate files 2017-09-10 12:53:06 +07:00
Ivan Kuznetsov bb70b4924b Clean up blockchain.go; improve TXInput and TXOutput 2017-09-10 12:45:15 +07:00
Ivan Kuznetsov 942120679b Clean up block.go; rework transaction hashing 2017-09-10 12:02:46 +07:00
Ivan Kuznetsov 80e320a16f Clean up base58.go 2017-09-10 11:42:11 +07:00
Ivan Kuznetsov 843858dc37 Fix TXInput.UnlocksOutputWith 2017-09-10 11:06:12 +07:00
Ivan Kuznetsov fc0c819c43 Extract some structs into separate files 2017-09-10 10:54:58 +07:00
Ivan Kuznetsov 2ce04f8f59 Implement transactions signing and verification 2017-09-10 10:34:39 +07:00
Ivan Kuznetsov 7e8c88867d Implement Transaction.Sign and Transaction.Verify 2017-09-08 21:29:34 +07:00
Ivan Kuznetsov 92be537fcd Use public key in transactions 2017-09-08 11:31:34 +07:00
Ivan Kuznetsov cb1776224e Store public key as a byte array 2017-09-08 10:41:03 +07:00
Ivan Kuznetsov 484d0bbae2 Extract public key hashing into a separate function 2017-09-08 10:27:28 +07:00
Ivan Kuznetsov e6eed1105f Fix Transaction.SetID 2017-09-08 10:09:04 +07:00
Ivan Kuznetsov 6b400109e9 In the 'printchain' command, print transactions as well 2017-09-08 10:06:19 +07:00
Ivan Kuznetsov 2b0619e103 Improve NewWallets and fix comments 2017-09-08 09:56:04 +07:00
Ivan Kuznetsov 75105982ae Update usage 2017-09-08 09:53:26 +07:00
Ivan Kuznetsov deb7e2ce03 Implement 'listaddresses' CLI command 2017-09-08 09:51:44 +07:00
Ivan Kuznetsov 5b0e4ecc19 Allow to create multiple wallets 2017-09-08 09:46:06 +07:00
Ivan Kuznetsov 4805ce1bdb Implement Base58Decode 2017-09-07 20:47:16 +07:00
Ivan Kuznetsov caf71744f5 Use crypto/ecdsa to generate ECDSA key pair 2017-09-07 17:05:57 +07:00
Ivan Kuznetsov 5a1e6f7e47 Don't create a wallet when wallet.dat already exists 2017-09-07 16:46:55 +07:00
Ivan Kuznetsov 8d7f945251 Save wallet to a file 2017-09-07 16:42:38 +07:00
Ivan Kuznetsov 24b19381d2 Rename address.go to wallet.go 2017-09-07 16:33:17 +07:00
Ivan Kuznetsov 70c04fa8ce Implement address generation and wallets 2017-09-07 14:18:12 +07:00
Ivan Kuznetsov 373a09b2bc Add a link to the README 2017-09-05 21:38:03 +07:00
Ivan Kuznetsov d107d924a8 Final fixes 2017-09-05 21:35:45 +07:00
Ivan Kuznetsov e89846d490 Rework UTXO related functions 2017-09-05 14:33:33 +07:00
Ivan Kuznetsov f4ae5168b0 Minor improvements 2017-09-05 12:26:29 +07:00
Ivan Kuznetsov c748768da2 genesisCoinbase → genesisCoinbaseData 2017-09-05 11:34:47 +07:00
Ivan Kuznetsov 7904009c2f Set PoW target to 24 2017-09-04 11:32:59 +07:00
Ivan Kuznetsov 32dd771eef Rename Transaction.GetHash to SetID; add Transaction.ID field 2017-09-04 11:32:24 +07:00