Merge branch 'release/0.2.2'
This commit is contained in:
		@@ -66,7 +66,12 @@ Contribution
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
If you'd like to contribute to Ethereum Go please fork, fix, commit and
 | 
					If you'd like to contribute to Ethereum Go please fork, fix, commit and
 | 
				
			||||||
send a pull request. Commits who do not comply with the coding standards
 | 
					send a pull request. Commits who do not comply with the coding standards
 | 
				
			||||||
are ignored.
 | 
					are ignored. If you send pull requests make absolute sure that you
 | 
				
			||||||
 | 
					commit on the `develop` branch and that you do not merge to master.
 | 
				
			||||||
 | 
					Commits that are directly based on master are simply ignored.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					To make life easier try [git flow](http://nvie.com/posts/a-successful-git-branching-model/) it sets
 | 
				
			||||||
 | 
					this all up and streamlines your work flow.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Coding standards
 | 
					Coding standards
 | 
				
			||||||
================
 | 
					================
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										16
									
								
								ethereum.go
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								ethereum.go
									
									
									
									
									
								
							@@ -32,12 +32,22 @@ func RegisterInterupts(s *eth.Ethereum) {
 | 
				
			|||||||
func CreateKeyPair(force bool) {
 | 
					func CreateKeyPair(force bool) {
 | 
				
			||||||
	data, _ := ethutil.Config.Db.Get([]byte("KeyRing"))
 | 
						data, _ := ethutil.Config.Db.Get([]byte("KeyRing"))
 | 
				
			||||||
	if len(data) == 0 || force {
 | 
						if len(data) == 0 || force {
 | 
				
			||||||
		log.Println("Generating new address and keypair")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		pub, prv := secp256k1.GenerateKeyPair()
 | 
							pub, prv := secp256k1.GenerateKeyPair()
 | 
				
			||||||
		addr := ethutil.Sha3Bin(pub[1:])[12:]
 | 
							addr := ethutil.Sha3Bin(pub[1:])[12:]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		log.Printf("Your new address is %x\n", addr)
 | 
							fmt.Printf(`
 | 
				
			||||||
 | 
					Generating new address and keypair.
 | 
				
			||||||
 | 
					Please keep your keys somewhere save.
 | 
				
			||||||
 | 
					Currently Ethereum(G) does not support
 | 
				
			||||||
 | 
					exporting keys.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					++++++++++++++++ KeyRing +++++++++++++++++++
 | 
				
			||||||
 | 
					addr: %x
 | 
				
			||||||
 | 
					prvk: %x
 | 
				
			||||||
 | 
					pubk: %x
 | 
				
			||||||
 | 
					++++++++++++++++++++++++++++++++++++++++++++
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					`, addr, prv, pub)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		keyRing := ethutil.NewValue([]interface{}{prv, addr, pub[1:]})
 | 
							keyRing := ethutil.NewValue([]interface{}{prv, addr, pub[1:]})
 | 
				
			||||||
		ethutil.Config.Db.Put([]byte("KeyRing"), keyRing.Encode())
 | 
							ethutil.Config.Db.Put([]byte("KeyRing"), keyRing.Encode())
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user