OSDN Git Service

modify func name
authormars <mars@bytom.io>
Sat, 15 Jun 2019 06:50:41 +0000 (14:50 +0800)
committermars <mars@bytom.io>
Sat, 15 Jun 2019 06:50:41 +0000 (14:50 +0800)
database/store.go
protocol/bc/types/block.go

index 8220b86..6fbc039 100644 (file)
@@ -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")
        }
index 4ad073a..189af97 100644 (file)
@@ -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)