@@ -1835,8 +1835,8 @@ func TestTapscriptTreeManager(t *testing.T) {
1835
1835
loadTapscriptTreeChecked (t , ctx , assetStore , tree5 , tree5Hash )
1836
1836
}
1837
1837
1838
- // storeMintAnchorUniCommitment stores a mint anchor commitment in the DB.
1839
- func storeMintAnchorUniCommitment (t * testing.T , assetStore AssetMintingStore ,
1838
+ // storeSupplyPreCommit stores a mint anchor commitment in the DB.
1839
+ func storeSupplyPreCommit (t * testing.T , assetStore AssetMintingStore ,
1840
1840
batchKey []byte , txOutputIndex int32 ,
1841
1841
taprootInternalKey keychain.KeyDescriptor , groupKey []byte ) {
1842
1842
@@ -1869,9 +1869,9 @@ func storeMintAnchorUniCommitment(t *testing.T, assetStore AssetMintingStore,
1869
1869
_ = assetStore .db .ExecTx (ctx , & writeTxOpts , upsertMintAnchorPreCommit )
1870
1870
}
1871
1871
1872
- // assertMintAnchorUniCommitment is a helper function that reads a mint anchor
1872
+ // assertSupplyPreCommit is a helper function that reads a mint anchor
1873
1873
// commitment from the DB and asserts that it matches the expected values.
1874
- func assertMintAnchorUniCommitment (t * testing.T , assetStore AssetMintingStore ,
1874
+ func assertSupplyPreCommit (t * testing.T , assetStore AssetMintingStore ,
1875
1875
batchKey []byte , txOutputIndex int32 ,
1876
1876
preCommitInternalKey keychain.KeyDescriptor , groupPubKeyBytes []byte ) {
1877
1877
@@ -1914,10 +1914,10 @@ func assertMintAnchorUniCommitment(t *testing.T, assetStore AssetMintingStore,
1914
1914
require .Equal (t , groupPubKeyBytes , preCommit .GroupKey )
1915
1915
}
1916
1916
1917
- // TestUpsertMintAnchorUniCommitment tests the UpsertMintAnchorUniCommitment
1918
- // FetchMintAnchorUniCommitment and SQL queries. In particular, it tests that
1919
- // upsert works correctly.
1920
- func TestUpsertMintAnchorUniCommitment (t * testing.T ) {
1917
+ // TestUpsertSupplyPreCommit tests the UpsertSupplyPreCommit and
1918
+ // FetchSupplyPreCommits SQL queries. In particular, it tests that upsert works
1919
+ // correctly.
1920
+ func TestUpsertSupplyPreCommit (t * testing.T ) {
1921
1921
t .Parallel ()
1922
1922
1923
1923
ctx := context .Background ()
@@ -1955,13 +1955,13 @@ func TestUpsertMintAnchorUniCommitment(t *testing.T) {
1955
1955
1956
1956
// Upsert a mint anchor commitment for the batch.
1957
1957
txOutputIndex := int32 (2 )
1958
- storeMintAnchorUniCommitment (
1958
+ storeSupplyPreCommit (
1959
1959
t , * assetStore , batchKey , txOutputIndex ,
1960
1960
preCommitInternalKey , groupPubKeyBytes ,
1961
1961
)
1962
1962
1963
1963
// Retrieve and inspect the mint anchor commitment we just inserted.
1964
- assertMintAnchorUniCommitment (
1964
+ assertSupplyPreCommit (
1965
1965
t , * assetStore , batchKey , txOutputIndex ,
1966
1966
preCommitInternalKey , groupPubKeyBytes ,
1967
1967
)
@@ -1970,12 +1970,12 @@ func TestUpsertMintAnchorUniCommitment(t *testing.T) {
1970
1970
// overwrite the existing one.
1971
1971
internalKey2 , _ := test .RandKeyDesc (t )
1972
1972
1973
- storeMintAnchorUniCommitment (
1973
+ storeSupplyPreCommit (
1974
1974
t , * assetStore , batchKey , txOutputIndex , internalKey2 ,
1975
1975
groupPubKeyBytes ,
1976
1976
)
1977
1977
1978
- assertMintAnchorUniCommitment (
1978
+ assertSupplyPreCommit (
1979
1979
t , * assetStore , batchKey , txOutputIndex , internalKey2 ,
1980
1980
groupPubKeyBytes ,
1981
1981
)
@@ -1985,12 +1985,12 @@ func TestUpsertMintAnchorUniCommitment(t *testing.T) {
1985
1985
groupPubKey2 := test .RandPubKey (t )
1986
1986
groupPubKey2Bytes := groupPubKey2 .SerializeCompressed ()
1987
1987
1988
- storeMintAnchorUniCommitment (
1988
+ storeSupplyPreCommit (
1989
1989
t , * assetStore , batchKey , txOutputIndex , internalKey2 ,
1990
1990
groupPubKey2Bytes ,
1991
1991
)
1992
1992
1993
- assertMintAnchorUniCommitment (
1993
+ assertSupplyPreCommit (
1994
1994
t , * assetStore , batchKey , txOutputIndex , internalKey2 ,
1995
1995
groupPubKey2Bytes ,
1996
1996
)
0 commit comments