Skip to content

Commit fdc8c72

Browse files
committed
more fixes
1 parent 6781fac commit fdc8c72

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

services/horizon/internal/integration/generate_ledgers_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ type sorobanTransaction struct {
3737
}
3838

3939
func TestGenerateLedgers(t *testing.T) {
40+
// TODO: Add support for LedgerCloseMetaV2 to run this test for Protocol 23 and above
41+
if integration.GetCoreMaxSupportedProtocol() > 22 {
42+
t.Skip("This test run does not support greater than Protocol 22")
43+
}
4044

4145
var transactionsPerLedger, ledgers, transfersPerTx int
4246
var output bool

services/horizon/internal/integration/invokehostfunction_test.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ func TestContractInvokeHostFunctionCreateContractByAddress(t *testing.T) {
184184
}
185185

186186
func TestContractInvokeHostFunctionCreateConstructorContract(t *testing.T) {
187-
return
188187
itest := integration.NewTest(t, integration.Config{
189188
EnableStellarRPC: true,
190189
QuickExpiration: true,
@@ -267,9 +266,15 @@ func TestContractInvokeHostFunctionCreateConstructorContract(t *testing.T) {
267266
assert.Len(t, invokeHostFunctionOpJson.AssetBalanceChanges, 1)
268267
assetBalanceChange := invokeHostFunctionOpJson.AssetBalanceChanges[0]
269268
assert.Equal(itest.CurrentTest(), assetBalanceChange.Amount, "10.0000000")
270-
assert.Equal(itest.CurrentTest(), assetBalanceChange.From, issuer)
271269
assert.Equal(itest.CurrentTest(), assetBalanceChange.To, strkey.MustEncode(strkey.VersionByteContract, contractID[:]))
272-
assert.Equal(itest.CurrentTest(), assetBalanceChange.Type, "transfer")
270+
if integration.GetCoreMaxSupportedProtocol() < 23 {
271+
assert.Equal(itest.CurrentTest(), assetBalanceChange.From, issuer)
272+
assert.Equal(itest.CurrentTest(), assetBalanceChange.Type, "transfer")
273+
} else {
274+
// see https://github.com/stellar/stellar-protocol/blob/master/core/cap-0067.md#protocol-upgrade-transition
275+
assert.Equal(itest.CurrentTest(), assetBalanceChange.From, "")
276+
assert.Equal(itest.CurrentTest(), assetBalanceChange.Type, "mint")
277+
}
273278
assert.Equal(itest.CurrentTest(), assetBalanceChange.Asset.Code, strings.TrimRight(asset.GetCode(), "\x00"))
274279
assert.Equal(itest.CurrentTest(), assetBalanceChange.Asset.Issuer, asset.GetIssuer())
275280
}

services/horizon/internal/integration/sac_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ func TestContractMintToAccount(t *testing.T) {
103103
effects.EffectAccountCredited,
104104
effects.EffectAccountDebited)
105105
} else {
106+
// see https://github.com/stellar/stellar-protocol/blob/master/core/cap-0067.md#remove-the-admin-from-the-sac-mint-and-clawback-events
106107
assert.Len(t, fx, 1)
107108
assertContainsEffect(t, fx,
108109
effects.EffectAccountCredited)

0 commit comments

Comments
 (0)