From ea1bf69806d5380c46c0c032d44e93068c0643e2 Mon Sep 17 00:00:00 2001 From: mars Date: Sat, 15 Jun 2019 14:50:41 +0800 Subject: [PATCH] modify func name --- database/store.go | 2 +- protocol/bc/types/block.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/database/store.go b/database/store.go index 8220b86c..6fbc0399 100644 --- a/database/store.go +++ b/database/store.go @@ -246,7 +246,7 @@ func (s *Store) LoadBlockIndex(stateBestHeight uint64) (*state.BlockIndex, error func (s *Store) SaveBlock(block *types.Block, ts *bc.TransactionStatus) error { startTime := time.Now() - binaryBlockHeader, err := block.MarshalTextForBlockHeadr() + binaryBlockHeader, err := block.MarshalTextForBlockHeader() if err != nil { return errors.Wrap(err, "Marshal block header") } diff --git a/protocol/bc/types/block.go b/protocol/bc/types/block.go index 4ad073a7..189af972 100644 --- a/protocol/bc/types/block.go +++ b/protocol/bc/types/block.go @@ -58,8 +58,8 @@ func (b *Block) UnmarshalText(text []byte) error { return nil } -// MarshalTextForBlockHeadr fulfills the json.Marshaler interface. -func (b *Block) MarshalTextForBlockHeadr() ([]byte, error) { +// MarshalTextForBlockHeader fulfills the json.Marshaler interface. +func (b *Block) MarshalTextForBlockHeader() ([]byte, error) { buf := bufpool.Get() defer bufpool.Put(buf) -- 2.11.0