Skip to content

Commit

Permalink
fix hash_id issue
Browse files Browse the repository at this point in the history
  • Loading branch information
gogoex committed Sep 27, 2024
1 parent 197e8d9 commit 26d803f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 98 deletions.
17 changes: 9 additions & 8 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -1434,26 +1434,27 @@ LIBBLSCT = libblsct.a
noinst_LIBRARIES = $(LIBBLSCT)
libblsct_a_SOURCES = \
blsct/external_api/blsct.cpp \
common/args.cpp \
common/system.cpp \
common/url.cpp \
common/args.cpp \
common/system.cpp \
common/url.cpp \
crypto/hmac_sha256.cpp \
crypto/ripemd160.cpp \
crypto/sha256_arm_shani.cpp \
crypto/sha256_avx2.cpp \
crypto/sha256_sse4.cpp \
crypto/sha256_sse41.cpp \
crypto/sha256_x86_shani.cpp \
crypto/sha256.cpp \
primitives/transaction.cpp \
script/script.cpp \
script/sign.cpp \
script/signingprovider.cpp \
rpc/util.cpp \
script/interpreter.cpp \
script/interpreter.cpp \
script/script.cpp \
script/sign.cpp \
script/signingprovider.cpp \
support/cleanse.cpp \
support/lockedpool.cpp \
uint256.cpp \
util/rbf.cpp \
util/rbf.cpp \
util/strencodings.cpp \
wallet/coincontrol.cpp \
wallet/context.cpp \
Expand Down
90 changes: 0 additions & 90 deletions src/blsct/external_api/blsct.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,6 @@
#define TOKEN_ID_SIZE 40 // uint256 + uint64_t = 32 + 8 = 40
#define UINT256_SIZE 32
#define VIEW_TAG_SIZE 8
// #define UINT16_SIZE 2
// #define CTXOUT_BLSCT_DATA_SIZE \
// POINT_SIZE * 3 + \
// RANGE_PROOF_SIZE + \
// UINT16_SIZE
// #define NORMAL_CSCRIPT_SIZE 1
// #define OP_SIZE 1
// #define STAKED_COMMITMENT_CSCRIPT_SIZE \
// OP_SIZE * 3 + \
// RANGE_PROOF_SIZE
// #define CTXOUT_SIZE CAMOUNT_SIZE + \
// CSCRIPT_SIZE + \
// CTXOUT_BLSCT_DATA_SIZE + \
// TOKEN_ID_SIZE
// #define UNSIGNED_OUTPUT_SIZE SCALAR_SIZE * 3 + CTXOUT_SIZE
#define OUT_POINT_SIZE 36
#define SIGNATURE_SIZE 96
#define SCRIPT_SIZE 28
Expand Down Expand Up @@ -129,7 +114,6 @@ if (name == nullptr) err(BLSCT_MEM_ALLOC_FAILED);

#define UNVOID(T, name) const T* name = reinterpret_cast<const T*>(void_##name)


#ifdef __cplusplus
extern "C" {
#endif
Expand Down Expand Up @@ -172,80 +156,6 @@ typedef uint8_t BlsctViewTag[VIEW_TAG_SIZE];
typedef uint8_t BlsctOutPoint[OUT_POINT_SIZE];
typedef uint8_t BlsctSignature[SIGNATURE_SIZE];

/*
typedef struct {
uint8_t script[SCRIPT_SIZE];
size_t size;
} BlsctScript;
typedef struct {
BlsctPoint A;
BlsctPoint S;
BlsctPoint T1;
BlsctPoint T2;
BlsctScalar mu;
BlsctScalar tau_x;
BlsctScalar a;
BlsctScalar b;
BlsctScalar t_hat;
} BlsctRangeProofDe;
typedef struct {
BlsctPoint spending_key;
BlsctPoint ephemeral_key;
BlsctPoint blinding_key;
BlsctRangeProofDe range_proof;
uint16_t view_tag;
} BlsctBlsctData;
typedef struct {
int64_t value;
BlsctScript script_pubkey;
BlsctBlsctData* blsct_data;
BlsctTokenId token_id;
} BlsctCTxOut;
typedef struct {
BlsctUint256 hash; // Txid
uint32_t n;
} BlsctCOutPoint;
typedef struct {
uint8_t* buf;
size_t size;
} BlsctVector;
typedef struct {
BlsctVector* stack;
size_t size;
} BlsctScriptWitness;
typedef struct {
BlsctCOutPoint prev_out;
BlsctScript script_sig;
uint32_t sequence;
BlsctScriptWitness script_witness;
} BlsctCTxIn;
typedef struct {
int32_t version;
uint32_t lock_time;
BlsctSignature tx_sig;
BlsctCTxIn* ins;
size_t num_ins;
BlsctCTxOut* outs;
size_t num_outs;
} BlsctTransaction;
typedef struct {
uint64_t token;
uint64_t subid;
} BlsctTokenIdDe;
*/

///// BEG new pointer-based API

typedef struct {
BLSCT_RESULT result;
void* value;
Expand Down

0 comments on commit 26d803f

Please sign in to comment.