OSDN Git Service

Merge branch 'dev' into wallet
authorBlockmeta-区块元 <blockmeta@8btc.com>
Tue, 31 Oct 2017 12:34:00 +0000 (20:34 +0800)
committerBlockmeta-区块元 <blockmeta@8btc.com>
Tue, 31 Oct 2017 12:34:00 +0000 (20:34 +0800)
1  2 
blockchain/hsm.go
blockchain/transact.go
blockchain/txbuilder/txbuilder.go
consensus/general.go

Simple merge
Simple merge
Simple merge
@@@ -37,40 -36,5 +37,40 @@@ func BlockSubsidy(height uint64) uint6
  }
  
  func InitBlock() []byte {
-       return []byte("0301000000000000000000000000000000000000000000000000000000000000000000ece090e7eb2b4078a79ed5c640a026361c4af77a37342e503cc68493229996e11dd9be38b18f5b492159980684155da19e87de0d1b37b35c1a1123770ec1dcc710aabe77607cce00b1c5a181808080802e0107010700ece090e7eb2b000001012cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8080ccdee2a69fb314010151000000")
+       return []byte("0301010000000000000000000000000000000000000000000000000000000000000000cecccaebf42b406b03545ed2b38a578e5e6b0796d4ebdd8a6dd72210873fcc026c7319de578ffc492159980684155da19e87de0d1b37b35c1a1123770ec1dcc710aabe77607cced7bb1993fcb680808080801e0107010700cecccaebf42b000001012cffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8080ccdee2a69fb314010151000000")
  }
 +
 +
 +// IsBech32SegwitPrefix returns whether the prefix is a known prefix for segwit
 +// addresses on any default or registered network.  This is used when decoding
 +// an address string into a specific address type.
 +func IsBech32SegwitPrefix(prefix string,  params *Params) bool {
 +      prefix = strings.ToLower(prefix)
 +      if prefix == params.Bech32HRPSegwit+"1"  {
 +              return true
 +      } else {
 +              return false
 +      }
 +}
 +
 +
 +type Params struct {
 +      // Name defines a human-readable identifier for the network.
 +      Name string
 +
 +      Bech32HRPSegwit string
 +
 +}
 +
 +
 +var MainNetParams = Params {
 +      Name: "main",
 +      Bech32HRPSegwit: "bm",
 +}
 +
 +
 +var TestNetParams = Params {
 +      Name: "test",
 +      Bech32HRPSegwit: "tm",
 +}
 +