kaspanet / rusty-kaspa

Kaspa full-node and related libraries in the Rust programming language. This is a Beta version at the final testing phases.
ISC License
350 stars 105 forks source link

error[E0412]: cannot find type `DeterministicHashData` in this scope #437

Closed hyperji closed 1 month ago

hyperji commented 1 month ago

Describe the bug error[E0412]: cannot find type DeterministicHashData in this scope

To Reproduce Steps to reproduce the behavior:

  1. Building on Linux
  2. then I run the test, it produces some error with the following code: cd rusty-kaspa cargo test --release

the error is in below:

`error: Seal changed - was: 0xa7a4 now: 0x544d --> wallet/core/src/deterministic.rs:59:9 | 59 | seal! { 0xa7a4, { | ^^^^^^

error[E0412]: cannot find type DeterministicHashData in this scope --> wallet/core/src/deterministic.rs:78:45 | 78 | fn make_hashes<T, const N: usize>(hashable: DeterministicHashData) -> [Hash; N] | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0422]: cannot find struct, variant or union type DeterministicHashData in this scope --> wallet/core/src/deterministic.rs:93:20 | 93 | let hashable = DeterministicHashData { | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0422]: cannot find struct, variant or union type DeterministicHashData in this scope --> wallet/core/src/deterministic.rs:106:20 | 106 | let hashable = DeterministicHashData { | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0422]: cannot find struct, variant or union type DeterministicHashData in this scope --> wallet/core/src/deterministic.rs:119:20 | 119 | let hashable = DeterministicHashData { | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0422]: cannot find struct, variant or union type DeterministicHashData in this scope --> wallet/core/src/deterministic.rs:132:20 | 132 | let hashable = DeterministicHashData { | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0412]: cannot find type DeterministicHashData in this scope --> wallet/core/src/deterministic.rs:145:19 | 145 | let hashable: DeterministicHashData<[PrvKeyDataId; 0]> = DeterministicHashData { | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0422]: cannot find struct, variant or union type DeterministicHashData in this scope --> wallet/core/src/deterministic.rs:145:62 | 145 | let hashable: DeterministicHashData<[PrvKeyDataId; 0]> = DeterministicHashData { | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0412]: cannot find type DeterministicHashData in this scope --> wallet/core/src/deterministic.rs:158:19 | 158 | let hashable: DeterministicHashData<[PrvKeyDataId; 0]> = DeterministicHashData { | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0422]: cannot find struct, variant or union type DeterministicHashData in this scope --> wallet/core/src/deterministic.rs:158:62 | 158 | let hashable: DeterministicHashData<[PrvKeyDataId; 0]> = DeterministicHashData { | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope

Some errors have detailed explanations: E0412, E0422. For more information about an error, try rustc --explain E0412. error: could not compile kaspa-wallet-core (lib) due to 10 previous errors warning: build failed, waiting for other jobs to finish... error: could not compile kaspa-wallet-core (lib test) due to 10 previous errors`

hyperji commented 1 month ago

屏幕截图 2024-03-23 174209 this is the file produces the error

hyperji commented 1 month ago

is there something wrong with the "0xa7a4" when compiling? 屏幕截图 2024-03-23 174909

hyperji commented 1 month ago

when I chaged 0xa7a4 to 0x544d, it run correctly, without any error.

coderofstuff commented 1 month ago

Fixed in #442 and also recognizing the initial fix that was done in #438