This is gmaxwell's 2-of-2 escrow example, adapted to Electrum and to a lesser extent, GFM.
Archey wants to pay Bertha 0.001 BTC for a Twitter Platinum invite, but prevent Bertha from cheating him. Archey selects Iceland to act as
type Plugin interface { | |
// Name of this plugin, should be short. | |
Name() string | |
// Run a transaction from ABCI DeliverTx | |
RunTx(store KVStore, ctx CallContext, txBytes []byte) (res abci.Result) | |
// Other ABCI message handlers | |
SetOption(store KVStore, key string, value string) (log string) | |
InitChain(store KVStore, vals []*abci.Validator) |
{"time":"2016-10-16T20:57:31.752Z","msg":[1,{"height":47595,"round":0,"step":"RoundStepNewHeight"}]} | |
{"time":"2016-10-16T20:57:32.780Z","msg":[3,{"duration":999834609,"height":47595,"round":0,"step":1}]} | |
{"time":"2016-10-16T20:57:32.780Z","msg":[1,{"height":47595,"round":0,"step":"RoundStepPropose"}]} | |
{"time":"2016-10-16T20:57:33.174Z","msg":[2,{"msg":[20,{"ValidatorIndex":1,"Vote":{"height":47595,"round":0,"type":1,"block_hash":"D3645CB2EF4FB03DCC7FB77C5CEE969765EF78BF","block_parts_header":{"total":13,"hash":"C28C08047DABB2E345B09BC77F0384453E3BED7C"},"signature":"E3875E3286F0581BA303C357FCEA9AF20255669A0B83C6318D11D220F6FDC9743F41BF1007B6C9C008C9F44DB1B7F8BE404F672C57DEC5BD26E5175A6F27230C"}}],"peer_key":"AC86D51269961BAAC1FCB58709E2499CD14CC4845DEF847D58A4BF73C578BA9B"}]} | |
{"time":"2016-10-16T20:57:33.183Z","msg":[2,{"msg":[20,{"ValidatorIndex":2,"Vote":{"height":47595,"round":0,"type":1,"block_hash":"D3645CB2EF4FB03DCC7FB77C5CEE969765EF78BF","block_parts_header":{"total":13,"hash":"C28C08047DABB2E345B09BC |
This is gmaxwell's 2-of-2 escrow example, adapted to Electrum and to a lesser extent, GFM.
Archey wants to pay Bertha 0.001 BTC for a Twitter Platinum invite, but prevent Bertha from cheating him. Archey selects Iceland to act as
package main | |
import ( | |
"sort" | |
"testing" | |
) | |
// SortString sorts a string | |
func SortString(w string) string { | |
wBytes := uint8Slice([]uint8(w)) |
I hereby claim:
To claim this, I am signing this object:
39015 default | |
5353 gopherjs/js | |
4667 runtime | |
847 errors | |
1926 sync/atomic | |
22451 sync | |
4968 io | |
18733 unicode | |
6980 unicode/utf8 |
// Compare to https://gist.github.com/jaekwon/8025b9f3a482b3219a21 | |
package main | |
import "fmt" | |
type Human struct{} | |
func (h Human) walk() { h.moveFeet() } | |
func (h Human) moveFeet() { fmt.Println("Human.walkFeet") } |
import java.util.*; | |
import java.lang.*; | |
import java.io.*; | |
class Human { | |
public Human() {} | |
public void walk() { | |
this.moveFeet(); | |
} | |
public void moveFeet() { |
{ | |
"Remotes": [ | |
"http://navytoad.chaintest.net:46662", | |
"http://whiteferret.chaintest.net:46662", | |
"http://magentagriffin.chaintest.net:46662", | |
"http://greensalamander.chaintest.net:46662", | |
"http://blackshadow.chaintest.net:46662", | |
"http://pinkpenguin.chaintest.net:46662", | |
"http://polkapig.chaintest.net:46662" | |
], |
INFO[04-02|19:50:25] Running round action module=consensus height=72872 round=0 step=RoundStepPrecommit roundAction="RoundAction{H:72872 R:0 A:RoundActionCommit}" startTime=2015-04-02T19:50:15-0700 | |
INFO[04-02|19:50:25] Running round action module=consensus height=72872 round=0 step=RoundStepCommit roundAction="RoundAction{H:72872 R:0 A:RoundActionTryFinalize}" startTime=2015-04-02T19:50:15-0700 | |
INFO[04-02|19:50:28] Running round action module=consensus height=72873 round=0 step=RoundStepNewHeight roundAction="RoundAction{H:72873 R:0 A:RoundActionPropose}" startTime=2015-04-02T19:50:28-0700 | |
INFO[04-02|19:50:31] Running round action module=consensus height=72873 round=0 step=RoundStepPropose roundAction="RoundAction{H:72873 R:0 A:RoundActionPrevote}" startTime=2015-04-02T19:50:28-0700 | |
INFO[04-02|19:50:35] Running round action module=consensus height=72873 round=0 step=RoundStepPrevote roundAction="RoundAction{H:7 |