Made extra modify-able
This commit is contained in:
parent
f3de9b4eb4
commit
8b943d4a08
5
main.go
5
main.go
|
@ -8,8 +8,9 @@ import (
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
fmt.Println("HashCash online! (no, curious console-dweller, this isn't a cryptocurrency miner)")
|
fmt.Println("HashCash online! (no, curious console-dweller, this isn't a cryptocurrency miner)")
|
||||||
fmt.Println("Beginning proof of work (this may take a while)...")
|
extra := js.Global().Get("resourceExtra").String()
|
||||||
pow := hashcash.New(20, 16, "I love burgernotes!")
|
fmt.Println("Beginning proof of work on " + extra + "(this may take a while)...")
|
||||||
|
pow := hashcash.New(20, 16, extra)
|
||||||
stamp, err := pow.Mint("signup")
|
stamp, err := pow.Mint("signup")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
js.Global().Set("returnVar", js.ValueOf(err.Error()))
|
js.Global().Set("returnVar", js.ValueOf(err.Error()))
|
||||||
|
|
Loading…
Reference in New Issue