• R/O
  • HTTP
  • SSH
  • HTTPS

bytom: コミット

Official Go implementation of the Bytom protocol


コミットメタ情報

リビジョンe9da3e41979a6a2093bc4aa0b440eaad4ba07204 (tree)
日時2021-04-08 18:53:56
作者mingjingc <2595400537@qq.c...>
コミッターmingjingc

ログメッセージ

fix(remove pow): delete space

変更サマリ

差分

--- a/protocol/bc/types/block_header_test.go
+++ b/protocol/bc/types/block_header_test.go
@@ -111,7 +111,6 @@ func TestMarshalBlockHeader(t *testing.T) {
111111 },
112112 wantError: blockchain.ErrRange,
113113 },
114-
115114 {
116115 blockHeader: &BlockHeader{
117116 Version: 1,
--- a/protocol/bc/types/block_test.go
+++ b/protocol/bc/types/block_test.go
@@ -8,12 +8,10 @@ import (
88 "testing"
99
1010 "github.com/bytom/bytom/consensus"
11-
12- "github.com/davecgh/go-spew/spew"
13-
1411 "github.com/bytom/bytom/encoding/blockchain"
1512 "github.com/bytom/bytom/protocol/bc"
1613 "github.com/bytom/bytom/testutil"
14+ "github.com/davecgh/go-spew/spew"
1715 )
1816
1917 func TestBlock(t *testing.T) {
@@ -71,7 +69,6 @@ func TestBlock(t *testing.T) {
7169 NewTx(TxData{
7270 Version: 1,
7371 SerializedSize: uint64(108),
74-
7572 Inputs: []*TxInput{
7673 NewCoinbaseInput([]byte("arbitrary")),
7774 },
--- a/protocol/validation/block_test.go
+++ b/protocol/validation/block_test.go
@@ -108,7 +108,6 @@ func TestCheckCoinbaseAmount(t *testing.T) {
108108 }
109109
110110 func TestValidateBlockHeader(t *testing.T) {
111-
112111 cases := []struct {
113112 desc string
114113 block *bc.Block
@@ -135,7 +134,6 @@ func TestValidateBlockHeader(t *testing.T) {
135134 },
136135 err: errMisorderedBlockHeight,
137136 },
138-
139137 {
140138 desc: "the prev block hash not equals to the hash of parent (blocktest#1004)",
141139 block: &bc.Block{BlockHeader: &bc.BlockHeader{
@@ -439,4 +437,4 @@ func TestSetTransactionStatus(t *testing.T) {
439437 t.Errorf("got tx status: %v, expect tx status: %v\n", status.StatusFail, expectTxStatuses[i])
440438 }
441439 }
442-}
\ No newline at end of file
440+}
--- a/test/block_test_util.go
+++ b/test/block_test_util.go
@@ -90,8 +90,3 @@ func AppendBlocks(chain *protocol.Chain, num uint64) error {
9090 }
9191 return nil
9292 }
93-
94-// Solve simulate solve difficulty by add result to cache
95-func Solve(seed *bc.Hash, block *types.Block) {
96-
97-}
旧リポジトリブラウザで表示