Open the mouth. Did it have fangs? I hope you didn’t kill a harmless black rat snake.
That is the sure way to tell. If there are fangs and a white mouth then yes you have a Cottonmouth. No fangs just a plate then some form of black snake. From what I've heard they are very agressive. One guy who used to post here named Sneakypete told me the best thing to keep snakes away was get cats. It makes sense as they compete for the same food and a cat is quicker in a fight. I used to have a lot of cats and no snakes. The cats died out and Copperheads showed up.
My grandmother killed all snakes, although she preffered a hoe over a shovel. More reach, and you can swing a hoe to pretty decent velocity. Any snake that got anywhere in the yard, or near the chicken coops, ended up like that one.
But FWIW, I think that's a poisonous snake by the head shape, and the report of fangs. That makes it a cottonmouth given the location.