github.com/amazechain/amc@v0.1.3/internal/consensus/apos/faker.go (about)

     1  // Copyright 2023 The AmazeChain Authors
     2  // This file is part of the AmazeChain library.
     3  //
     4  // The AmazeChain library is free software: you can redistribute it and/or modify
     5  // it under the terms of the GNU Lesser General Public License as published by
     6  // the Free Software Foundation, either version 3 of the License, or
     7  // (at your option) any later version.
     8  //
     9  // The AmazeChain library is distributed in the hope that it will be useful,
    10  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    11  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    12  // GNU Lesser General Public License for more details.
    13  //
    14  // You should have received a copy of the GNU Lesser General Public License
    15  // along with the AmazeChain library. If not, see <http://www.gnu.org/licenses/>.
    16  
    17  package apos
    18  
    19  import (
    20  	"github.com/amazechain/amc/common/block"
    21  	"github.com/amazechain/amc/common/transaction"
    22  	"github.com/amazechain/amc/common/types"
    23  	"github.com/amazechain/amc/internal/consensus"
    24  	"github.com/amazechain/amc/modules/rpc/jsonrpc"
    25  	"github.com/amazechain/amc/modules/state"
    26  	"github.com/amazechain/amc/params"
    27  	"github.com/holiman/uint256"
    28  	"github.com/ledgerwatch/erigon-lib/kv"
    29  )
    30  
    31  type Faker struct{}
    32  
    33  func (f Faker) Author(header block.IHeader) (types.Address, error) {
    34  	//TODO implement me
    35  	panic("implement me")
    36  }
    37  
    38  func (f Faker) VerifyHeader(chain consensus.ChainHeaderReader, header block.IHeader, seal bool) error {
    39  	//TODO implement me
    40  	panic("implement me")
    41  }
    42  
    43  func (f Faker) VerifyHeaders(chain consensus.ChainHeaderReader, headers []block.IHeader, seals []bool) (chan<- struct{}, <-chan error) {
    44  	//TODO implement me
    45  	panic("implement me")
    46  }
    47  
    48  func (f Faker) VerifyUncles(chain consensus.ChainReader, block block.IBlock) error {
    49  	//TODO implement me
    50  	panic("implement me")
    51  }
    52  
    53  func (f Faker) Prepare(chain consensus.ChainHeaderReader, header block.IHeader) error {
    54  	//TODO implement me
    55  	panic("implement me")
    56  }
    57  
    58  func (f Faker) Finalize(chain consensus.ChainHeaderReader, header block.IHeader, state *state.IntraBlockState, txs []*transaction.Transaction, uncles []block.IHeader) ([]*block.Reward, map[types.Address]*uint256.Int, error) {
    59  	//TODO implement me
    60  	panic("implement me")
    61  }
    62  
    63  func (f Faker) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header block.IHeader, state *state.IntraBlockState, txs []*transaction.Transaction, uncles []block.IHeader, receipts []*block.Receipt) (block.IBlock, []*block.Reward, map[types.Address]*uint256.Int, error) {
    64  	//TODO implement me
    65  	panic("implement me")
    66  }
    67  
    68  func (f Faker) Rewards(tx kv.RwTx, header block.IHeader, state *state.IntraBlockState, setRewards bool) ([]*block.Reward, error) {
    69  	//TODO implement me
    70  	panic("implement me")
    71  }
    72  
    73  func (f Faker) Seal(chain consensus.ChainHeaderReader, block block.IBlock, results chan<- block.IBlock, stop <-chan struct{}) error {
    74  	//TODO implement me
    75  	panic("implement me")
    76  }
    77  
    78  func (f Faker) SealHash(header block.IHeader) types.Hash {
    79  	//TODO implement me
    80  	panic("implement me")
    81  }
    82  
    83  func (f Faker) CalcDifficulty(chain consensus.ChainHeaderReader, time uint64, parent block.IHeader) *uint256.Int {
    84  	//TODO implement me
    85  	panic("implement me")
    86  }
    87  
    88  func (f Faker) Type() params.ConsensusType {
    89  	return params.Faker
    90  }
    91  
    92  func (f Faker) APIs(chain consensus.ChainReader) []jsonrpc.API {
    93  	//TODO implement me
    94  	panic("implement me")
    95  }
    96  
    97  func (f Faker) Close() error {
    98  	//TODO implement me
    99  	panic("implement me")
   100  }
   101  
   102  func NewFaker() consensus.Engine {
   103  	return &Faker{}
   104  }
   105  
   106  func (f Faker) IsServiceTransaction(sender types.Address, syscall consensus.SystemCall) bool {
   107  	return false
   108  }