LCOV - code coverage report
Current view: top level - src/instantsend - lock.h (source / functions) Hit Total Coverage
Test: test_dash_coverage.info Lines: 9 10 90.0 %
Date: 2026-06-25 07:23:51 Functions: 7 19 36.8 %

          Line data    Source code
       1             : // Copyright (c) 2019-2025 The Dash Core developers
       2             : // Distributed under the MIT software license, see the accompanying
       3             : // file COPYING or http://www.opensource.org/licenses/mit-license.php.
       4             : 
       5             : #ifndef BITCOIN_INSTANTSEND_LOCK_H
       6             : #define BITCOIN_INSTANTSEND_LOCK_H
       7             : 
       8             : #include <bls/bls.h>
       9             : #include <serialize.h>
      10             : #include <uint256.h>
      11             : 
      12             : #include <cstdint>
      13             : #include <memory>
      14             : #include <vector>
      15             : 
      16             : class COutPoint;
      17             : 
      18             : namespace instantsend {
      19           0 : struct InstantSendLock {
      20             :     static constexpr uint8_t CURRENT_VERSION{1};
      21             : 
      22           2 :     uint8_t nVersion{CURRENT_VERSION};
      23             :     std::vector<COutPoint> inputs;
      24             :     uint256 txid;
      25             :     uint256 cycleHash;
      26             :     CBLSLazySignature sig;
      27             : 
      28           6 :     InstantSendLock() = default;
      29             : 
      30           3 :     SERIALIZE_METHODS(InstantSendLock, obj)
      31             :     {
      32           1 :         READWRITE(obj.nVersion);
      33           1 :         READWRITE(obj.inputs);
      34           1 :         READWRITE(obj.txid);
      35           1 :         READWRITE(obj.cycleHash);
      36           1 :         READWRITE(obj.sig);
      37           1 :     }
      38             : 
      39             :     uint256 GetRequestId() const;
      40             :     bool TriviallyValid() const;
      41             : };
      42             : 
      43             : uint256 GenInputLockRequestId(const COutPoint& outpoint);
      44             : 
      45             : using InstantSendLockPtr = std::shared_ptr<InstantSendLock>;
      46             : } // namespace instantsend
      47             : 
      48             : #endif // BITCOIN_INSTANTSEND_LOCK_H

Generated by: LCOV version 1.16