Add go-subtree source code #1
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant changes across multiple files, including adding new functionality for transaction input points and merkle tree calculations, updating the license, and enhancing the codebase with utility functions and linting configurations. Below is a summary of the most important changes grouped by theme:
Licensing Update:
LICENSE: Replaced the MIT license with the Open BSV License Version 5, which introduces specific conditions for using the software, emphasizing its usage on BSV Blockchains and compliance with Network Access Rules.Linting Configuration:
.golangci.json: Disabled additional linters (testifylint,revive,gochecknoinits,forbidigo,err113) to refine linting rules for the project.Transaction Input Points (
TxInpoints) Functionality:inpoints.go: Added a newTxInpointsstructure to manage transaction input points, including methods for serialization, deserialization, and retrieving parent transaction hashes and indexes.inpoints_test.go: Introduced comprehensive tests forTxInpoints, covering serialization, deserialization, and edge cases for retrieving parent transaction data.Merkle Tree Enhancements:
merkle_tree.go: Added functions for building merkle trees and generating merkle proofs for coinbase transactions, including parallelized calculations for large trees.Utility Functions:
compare.go: Implemented genericMinandMaxfunctions for comparing ordered values.compare_test.go: Added tests for theMinandMaxutility functions to ensure correctness across various inputs.Other Changes:
coinbase_placeholder.go: Added placeholder values for coinbase transactions to optimize compiler performance and included a function to check if a transaction is a coinbase placeholder.coinbase_placeholder_test.go: Added tests for validating coinbase placeholder transaction properties and behavior.examples/example.go: Removed the example file demonstrating basic usage of the package.go.mod: Updated dependencies and added replacements for certain modules, such asgithub.com/libsv/go-bt/v2.