github.com/igggame/nebulas-go@v2.1.0+incompatible/nbre/cmd/dummy_neb/generator/checkers.h (about)

     1  // Copyright (C) 2018 go-nebulas authors
     2  //
     3  // This file is part of the go-nebulas library.
     4  //
     5  // the go-nebulas library is free software: you can redistribute it and/or
     6  // modify
     7  // it under the terms of the GNU General Public License as published by
     8  // the Free Software Foundation, either version 3 of the License, or
     9  // (at your option) any later version.
    10  //
    11  // the go-nebulas library is distributed in the hope that it will be useful,
    12  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    13  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    14  // GNU General Public License for more details.
    15  //
    16  // You should have received a copy of the GNU General Public License
    17  // along with the go-nebulas library.  If not, see
    18  // <http://www.gnu.org/licenses/>.
    19  //
    20  #pragma once
    21  #include "cmd/dummy_neb/generator/generator_base.h"
    22  
    23  class nbre_version_checker : public checker_task_base {
    24  public:
    25    nbre_version_checker();
    26    virtual ~nbre_version_checker();
    27    virtual void check();
    28    virtual std::string name() const;
    29  };
    30  
    31  class nbre_nr_result_check : public checker_task_base {
    32  public:
    33    nbre_nr_result_check(const std::string &nr_handle);
    34  
    35    virtual ~nbre_nr_result_check();
    36    virtual void check();
    37    virtual std::string name() const;
    38  
    39  protected:
    40    std::string m_nr_handle;
    41  };
    42  
    43  class nbre_nr_handle_check : public checker_task_base {
    44  public:
    45    nbre_nr_handle_check(uint64_t start_block, uint64_t end_block);
    46    virtual ~nbre_nr_handle_check();
    47    virtual void check();
    48    virtual std::string name() const;
    49  
    50  protected:
    51    uint64_t m_start_block;
    52    uint64_t m_end_block;
    53    std::shared_ptr<nbre_nr_result_check> m_nr_result_checker;
    54  };
    55  
    56  class nbre_dip_reward_check : public checker_task_base {
    57  public:
    58    nbre_dip_reward_check(uint64_t height);
    59    virtual ~nbre_dip_reward_check();
    60    virtual void check();
    61    virtual std::string name() const;
    62  
    63  protected:
    64    uint64_t m_height;
    65  };